@@ 25-31 (lines=7) @@ | ||
22 | * |
|
23 | * @return array |
|
24 | */ |
|
25 | public function rules() |
|
26 | { |
|
27 | return [ |
|
28 | 'name' => ['required', 'string', 'min:3', 'unique:roles'], |
|
29 | 'display_name' => ['required', 'string', 'min:3'], |
|
30 | ]; |
|
31 | } |
|
32 | ||
33 | /** |
|
34 | * Get custom attributes for validator errors. |
@@ 24-30 (lines=7) @@ | ||
21 | * |
|
22 | * @return array |
|
23 | */ |
|
24 | public function rules() |
|
25 | { |
|
26 | return [ |
|
27 | 'name' => ['required', 'string', 'min:3', 'unique:roles,name,' . $this->role->id], |
|
28 | 'display_name' => ['required', 'string', 'min:3'], |
|
29 | ]; |
|
30 | } |
|
31 | ||
32 | /** |
|
33 | * Get custom attributes for validator errors. |