contributte / forms-multiplier

:repeat: Form multiplier & replicator for Nette Framework

Home Page:https://contributte.org/packages/contributte/forms-multiplier.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Exception of validation

jAKErCZ opened this issue · comments

Hi, I should ask how can I turn off or bypass that when adding a new line using
$multiplier->addCreateButton('Add');
will not validate my entire form?

Something like the classic form of the function?
->setValidationScope()

Try:

$multiplier->addCreateButton('Add', 1, function (WebChemistry\Forms\Controls\Submitter $submitter) {
    $submitter->setValidationScope([]);
});

I push commit soon (max 30 minutes), which will allow:

$multiplier->addCreateButton('Add')
    ->setNoValidate();

You can use $multiplier->addCreateButton('Add')->setValidationScope(...) too