F
Filamentβ€’2mo ago
Leonardy

Validation in the Repeater field

I have a repeater column, I need to validate that the sum of value is always equal to 100. How do I do this validation? I don't want to validate just one field. I need all "Valor" fields to validate
No description
No description
5 Replies
Adnan Yalahow
Adnan Yalahowβ€’2mo ago
Forms\Components\TextInput::make('valor')->required()->in(100)
Forms\Components\TextInput::make('valor')->required()->in(100)
Leonardy
Leonardyβ€’2mo ago
I need the sum of repeater field values ​​to not be greater than 100, and not just one field. This way there is only one field.
Adnan Yalahow
Adnan Yalahowβ€’2mo ago
Check out custom rules especially 😎
Leonardy
Leonardyβ€’2mo ago
I'll look! Thank you very much!