-
-
Notifications
You must be signed in to change notification settings - Fork 151
Closed
Description
Version: 3.3.0 and others
Bug Description
If input is of type number and depends on other input and number validation fails, than form is not valid but no error is added to Nette.formErrors. Even no further errors are added.
Steps To Reproduce
protected function createComponentTest(): Nette\Application\UI\Form
{
$form = new Nette\Application\UI\Form();
$dep = $form->addCheckbox('dep', 'Num required');
$num = $form->addText('num', 'Number');
$num->setHtmlAttribute('type', 'number');
$num->addConditionOn($dep, $form::EQUAL, true)->setRequired();
$form->addText('required', 'Required')->setRequired();
$form->addSubmit('submit', 'done');
return $form;
}
Check the checkbox.
Enter non numeric value, eg 5X to Number field.
Do not fill Required field.
And submit the form.
No error is displayed.
Expected Behavior
Two errors should be displayed:
- Please enter a valid value.
- This field is required.
Possible Solution
Metadata
Metadata
Assignees
Labels
No labels