F
Filament16mo ago
Rus

How to create really unique Repeater

Hi, all! We have repeater with some field, let's say 'name'. This name should be unique. So if we add several items of repeater and try to fill name field in some of them with non unique value - it shouldn't pass validation. What s the best way to do something like that?
4 Replies
Rus
RusOP16mo ago
@idpry Thanks a lot! It really helped me to get the message that the name is not unique, but it still doesn't block saving of my form. Do you have some idea why it happens?
awcodes
awcodes16mo ago
Do you have a validation rule for the repeater? You can validated that items in an array are unique. Have a look at Laravel’s validation rules.
Rus
RusOP16mo ago
@awcodes Thank you! It gave me direction and I deсided to use livewire Error bag in the rule.
Want results from more Discord servers?
Add your server