Dont register users with more than 4 uppercase characters

This commit is contained in:
Torsten 2025-06-30 08:13:53 +02:00
parent 8c05789829
commit c92e416d7e

View file

@ -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'],