nova-repeatable-fields icon indicating copy to clipboard operation
nova-repeatable-fields copied to clipboard

Allow validation of the fields

Open daniel-valchev-despark opened this issue 5 years ago • 1 comments

Example:

Repeater::make('Description List')
                ->addButtonText('Add row')
                ->addField([
                    'label' => 'Type',
                    'type' => 'select',
                    'name' => 'type',
                    'options' => [ 'advantage' => '+', 'disadvantage' => '-' ],
                    'placeholder' => '+/-',
                    'width' => 'w-1/5',
                ])
                ->addField([
                    'label' => 'Text',
                    'type' => 'text',
                    'name' => 'text',
                    'width' => 'w-4/5',
                ])
                ->rules(['text' => 'required', 'type' => 'required'])

daniel-valchev-despark avatar Jun 11 '19 14:06 daniel-valchev-despark

@fourstacks This would be a great addition to your field!

timcv avatar Sep 04 '19 13:09 timcv