diff --git a/app/Http/Controllers/Auth/RegisterController.php b/app/Http/Controllers/Auth/RegisterController.php index 713ffe63e..738171ded 100644 --- a/app/Http/Controllers/Auth/RegisterController.php +++ b/app/Http/Controllers/Auth/RegisterController.php @@ -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', diff --git a/resources/views/site/index.blade.php b/resources/views/site/index.blade.php index 03be6fd9c..d623792da 100644 --- a/resources/views/site/index.blade.php +++ b/resources/views/site/index.blade.php @@ -75,7 +75,7 @@
-
+
@@ -86,7 +86,7 @@
@if(true === config('pixelfed.open_registration')) -
+ @csrf
@@ -102,7 +102,7 @@
- + @if ($errors->has('username')) @@ -141,6 +141,16 @@
+
+
+
+ + +
+
+
-
+

Have an account? Log in