You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I need to set a range validator on two dateinputs, so that date_from couldn't be newer than date_to.
This is how I expect that it should be:
$form['date_to']->addRule(Form::RANGE, "The date 'from' cannot be later than the date 'to'.", [$form['date_from'], null]);
but I'm receiving the following error:
Argument 1 passed to Vodacek\Forms\Controls\DateInput::normalizeDate() must be an instance of DateTime, instance of Vodacek\Forms\Controls\DateInput given, called in /data/src/interiors-remeslnici/vendor/voda/date-input/src/DateInput.php on line 138
So I had to write a server validation using onValidate[].
The text was updated successfully, but these errors were encountered:
I need to set a range validator on two dateinputs, so that date_from couldn't be newer than date_to.
This is how I expect that it should be:
$form['date_to']->addRule(Form::RANGE, "The date 'from' cannot be later than the date 'to'.", [$form['date_from'], null]);
but I'm receiving the following error:
So I had to write a server validation using onValidate[].
The text was updated successfully, but these errors were encountered: