Skip to content

Commit

Permalink
Change GroupStore request validation
Browse files Browse the repository at this point in the history
  • Loading branch information
Bubka committed Jun 30, 2023
1 parent cb605ca commit 9646afd
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
2 changes: 1 addition & 1 deletion app/Api/v1/Requests/GroupStoreRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public function rules()
return [
'name' => [
'required',
'alpha_dash',
'regex:/^[a-zA-Z0-9\s\-_]+$/',
'max:32',
Rule::unique('groups')->where(fn ($query) => $query->where('user_id', $this->user()->id)),
],
Expand Down
3 changes: 0 additions & 3 deletions tests/Api/v1/Requests/GroupStoreRequestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,6 @@ public function provideInvalidData() : array
[[
'name' => true, // string
]],
[[
'name' => 8, // string
]],
[[
'name' => 'mmmmmmoooooorrrrrreeeeeeettttttthhhhhhaaaaaaannnnnn32cccccchhhhhaaaaaarrrrrrsssssss', // max:32
]],
Expand Down

0 comments on commit 9646afd

Please sign in to comment.