mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-07-28 17:02:04 +03:00
Standardised laravel validation to be array based
Converted from string-only-based validation. Array based validation works nicer once you have validation classess or advanced validation options.
This commit is contained in:
@ -48,7 +48,7 @@ class RoleController extends Controller
|
||||
{
|
||||
$this->checkPermission('user-roles-manage');
|
||||
$this->validate($request, [
|
||||
'display_name' => 'required|min:3|max:180',
|
||||
'display_name' => ['required', 'min:3', 'max:180'],
|
||||
'description' => 'max:180',
|
||||
]);
|
||||
|
||||
@ -83,7 +83,7 @@ class RoleController extends Controller
|
||||
{
|
||||
$this->checkPermission('user-roles-manage');
|
||||
$this->validate($request, [
|
||||
'display_name' => 'required|min:3|max:180',
|
||||
'display_name' => ['required', 'min:3', 'max:180'],
|
||||
'description' => 'max:180',
|
||||
]);
|
||||
|
||||
|
Reference in New Issue
Block a user