Skip to content
This repository was archived by the owner on Sep 10, 2019. It is now read-only.

Allow validation of the fields#38

Open
daniel-valchev-despark wants to merge 2 commits intofourstacks:masterfrom
daniel-valchev-despark:master
Open

Allow validation of the fields#38
daniel-valchev-despark wants to merge 2 commits intofourstacks:masterfrom
daniel-valchev-despark:master

Conversation

@daniel-valchev-despark
Copy link
Copy Markdown

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'])

@timcv
Copy link
Copy Markdown

timcv commented Sep 4, 2019

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants