Custom repeater validation

Hey guys,

I have a repeater with some fields and a toggle like this:
Forms\Components\Repeater::make('someRepeater')
    ->schema([
        Forms\Components\Toggle::make('someToggle'),
    ]),

I want to validate that only 1 of the fields can be active at the same time. Any tips on how to get this done?
Solution
I managed to use the Form\Set $set function to change the value back to false. I thought this wasn't working, but after updating van v3-alpha to v3-beta it started working 🙂
I can no-longer access the ->getOldState() on the parent, but I managed to get this working with the ->getState() function and checking for $approvedCount > 1.
Was this page helpful?