0
0
Fork 0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-05-22 07:40:58 +00:00

Set a fairly sensible limit on user name validation

Also updated controller properties with types within modified files.
Related to 
This commit is contained in:
Dan Brown 2022-08-09 12:40:59 +01:00
parent 89ec9a5081
commit 4209f27f1a
No known key found for this signature in database
GPG key ID: 46D9F943C24A2EF9
3 changed files with 10 additions and 10 deletions
app/Http/Controllers/Api

View file

@ -36,7 +36,7 @@ class UserApiController extends ApiController
{
return [
'create' => [
'name' => ['required', 'min:2'],
'name' => ['required', 'min:2', 'max:100'],
'email' => [
'required', 'min:2', 'email', new Unique('users', 'email'),
],
@ -48,7 +48,7 @@ class UserApiController extends ApiController
'send_invite' => ['boolean'],
],
'update' => [
'name' => ['min:2'],
'name' => ['min:2', 'max:100'],
'email' => [
'min:2',
'email',