Skip to content

Commit

Permalink
Merge pull request #271 from bezhanSalleh/fix/add-unique-validation-f…
Browse files Browse the repository at this point in the history
…or-role-name

fixes role name uniqueness
  • Loading branch information
bezhanSalleh authored Nov 3, 2023
2 parents fae4c9b + 44ad0fb commit 30cbacd
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Resources/RoleResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ public static function form(Form $form): Form
->schema([
Forms\Components\TextInput::make('name')
->label(__('filament-shield::filament-shield.field.name'))
->unique(ignoreRecord: true)
->required()
->maxLength(255),
Forms\Components\TextInput::make('guard_name')
Expand Down

0 comments on commit 30cbacd

Please sign in to comment.