Change GroupStore request validation

This commit is contained in:
Bubka 2023-06-30 15:19:47 +02:00
parent cb605cabbd
commit 9646afd2cc
2 changed files with 1 additions and 4 deletions

View File

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

View File

@ -105,9 +105,6 @@ public function provideInvalidData() : array
[[
'name' => true, // string
]],
[[
'name' => 8, // string
]],
[[
'name' => 'mmmmmmoooooorrrrrreeeeeeettttttthhhhhhaaaaaaannnnnn32cccccchhhhhaaaaaarrrrrrsssssss', // max:32
]],