Skip to content

Commit

Permalink
Merge pull request #76 from josefo727/Feat/AddIgnoreRecordInProjectEdit
Browse files Browse the repository at this point in the history
Feat: Added 'ignoreRecord' attribute to the 'unique' validation rule …
  • Loading branch information
heloufir authored May 9, 2023
2 parents a919a38 + ff5903f commit 3e1e455
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/Filament/Resources/ProjectResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public static function form(Form $form): Form
->label(__('Ticket prefix'))
->maxLength(3)
->columnSpan(2)
->unique(Project::class, column: 'ticket_prefix')
->unique(Project::class, column: 'ticket_prefix', ignoreRecord: true)
->disabled(
fn($record) => $record && $record->tickets()->count() != 0
)
Expand Down

0 comments on commit 3e1e455

Please sign in to comment.