Dont register users with more than 4 uppercase characters
This commit is contained in:
parent
8c05789829
commit
c92e416d7e
1 changed files with 6 additions and 0 deletions
|
|
@ -62,6 +62,12 @@ class RegisterController extends Controller
|
|||
*/
|
||||
protected function create(array $data)
|
||||
{
|
||||
if (preg_match_all('/[A-Z]/', $data['name']) > 4) {
|
||||
// The string contains more than 4 uppercase characters
|
||||
// echo "More than 4 uppercase letters found.";
|
||||
return;
|
||||
}
|
||||
|
||||
return User::create([
|
||||
'name' => $data['name'],
|
||||
'email' => $data['email'],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue