首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >得到自定义注册页上的注册错误消息

得到自定义注册页上的注册错误消息
EN

Stack Overflow用户
提问于 2018-07-18 05:29:46
回答 1查看 0关注 0票数 0

我有一个定制的php页面,它有一个注册表单:

php:

代码语言:txt
复制
<?php require_once __DIR__ . '/../../../vanguard/extra/auth.php';\
$foundUsername = "testUser";
?>

<form role="form" action="https://my.neonn.com.au/register" method="POST" id="registration-form" autocomplete="off">
    <input type="hidden" value="<?= csrf_token() ?>" name="_token">
    <input type="hidden" name="username" id="username" value="<?php echo $foundUsername; ?>">
    <input type="password" class="form-control empty" id="inputPassword" name="password">
    <input type="password" class="form-control empty" id="inputPasswordCheck" name="password_confirmation">

    <button type="submit">Submit</button>
</form>

我试图显示当密码不符合规则时显示的“部分/消息”错误。例如,包含6个字符。

我尝试过将这些添加到我的代码中。<?= @include('partials/messages') ?>似乎什么都没有用。

EN

回答 1

Stack Overflow用户

发布于 2018-07-18 14:50:43

我认为你真的需要更多地阅读Laravel文档 - 在这里你似乎有点偏僻,特别是在使用模板/通过控制器将数据传递给你的视图时。我担心如果你对基础知识没有了解,那么你将会遇到很多麻烦。

你应该从这里开始。

但是要回答这个问题:

“..密码不符合规则时显示的错误。例如包含6个字符......”

假设你要在用户输入数据时执行此操作,而不是在提交实际表单时。如果是这样,可以随时查看表单输入绑定jquery .keyup函数。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/-100005593

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档