Is there a way to separate the validator from the input? eg.
$input->getValidatorChain() ->attach('email_address') ->attach('no_record_exists'); if($isExistingUser == true) { $input->getValidatorChain() ->remove('no_record_exists'); }
$form->getInputFilter()->remove('no_record_exists');
The form is a Zend \ Form \ Form object.
To disable, for example. necessary check, you can do:
$ form-> getInputFilter () → get ('field form') → setRequired (false);
Source: https://habr.com/ru/post/1485630/More articles:Passing a List from C ++ to C # - c #Split list in list by item - c #Where is the best place for event callbacks? (anonymous or named) - javascriptWhy use Perl OO simply as a method of encapsulating data? - oopIs there a Perl module for accessing complex structure data with SQL? - perlHow to transfer some data to ValidationFilter? [Zend 2] - phpIs it possible to test Angular without karma? - angularjsOracle SQL: choosing a date field without a day (only month and year) - sqlHow to show the blue arrow in an Android app like Google Maps? - android-locationAccess-Control-Allow-Origin Limit - asp.netAll Articles