Update landing page, add age check
This commit is contained in:
parent
256f6b3515
commit
d11e82c3d9
2 changed files with 16 additions and 5 deletions
|
@ -63,7 +63,7 @@ class RegisterController extends Controller
|
|||
'unique:users',
|
||||
function ($attribute, $value, $fail) {
|
||||
if (!ctype_alpha($value[0])) {
|
||||
return $fail('Username is invalid. Username must be alpha-numeric and start with a letter.');
|
||||
return $fail('Username is invalid. Must start with a letter or number.');
|
||||
}
|
||||
$val = str_replace(['_', '-', '.'], '', $value);
|
||||
if(!ctype_alnum($val)) {
|
||||
|
@ -73,6 +73,7 @@ class RegisterController extends Controller
|
|||
];
|
||||
|
||||
$rules = [
|
||||
'agecheck' => 'required|accepted',
|
||||
'name' => 'nullable|string|max:'.config('pixelfed.max_name_length'),
|
||||
'username' => $usernameRules,
|
||||
'email' => 'required|string|email|max:255|unique:users',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue