简体   繁体   English

Laravel 5.4-注册表格,用户名小写

[英]Laravel 5.4 - Register form, Username lowercase

I can't find the position and what to change on the register field there is: 我找不到位置和在寄存器字段上要更改的内容:

Username First Name Last Name Password Password confirm 用户名名姓密码密码确认

Right now the username accepts only lowercase but I want to accept both. 现在,用户名只接受小写字母,但我想两者都接受。 Uppercase and lowercase. 大写和小写。 I also don't want spaces to appear. 我也不希望出现空格。

I searched in: RegisterController.php and some js but couldn't fint it. 我搜索了:RegisterController.php和一些js,但找不到它。 What to change where (Laravel newbie here). 在哪里更改什么(Laravel新手在这里)。

Thanks! 谢谢!

 protected function validator(array $data)
{
    return Validator::make($data, [
        'username' => 'required|max:255|unique:users|alpha_dash', 
        'email' => 'required|email|max:255|unique:users', 
        'password' => 'required|min:6|confirmed',
        'password_confirmation' => 'required|min:6', 
        'accepted' => 'required|accepted
    ]);
}

In RegisterController look for function name validator like above and remove the validation. 在RegisterController中,像上面一样查找函数名validator并删除验证。

Hope this helps. 希望这可以帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM