Last active
August 2, 2017 14:38
-
-
Save pikl-cz/d5a18a0eeaacfbfb51a6903b709aeab9 to your computer and use it in GitHub Desktop.
budtoneboto validace nette form
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$input1 | |
->setType("number") | |
->addCondition(\Nette\Application\UI\Form::FILLED) | |
->addRule(\Nette\Application\UI\Form::NUMERIC, "%label musí být číselná hodnota") | |
->endCondition() | |
->addConditionOn($input2, \Nette\Application\UI\Form::BLANK) | |
->addRule(\Nette\Application\UI\Form::FILLED, 'Povinný') | |
->endCondition(); | |
$input2 | |
->setType("number") | |
->addCondition(\Nette\Application\UI\Form::FILLED) | |
->addRule(\Nette\Application\UI\Form::NUMERIC, "%label musí být číselná hodnota") | |
->endCondition() | |
->addConditionOn($input1, \Nette\Application\UI\Form::BLANK) | |
->addRule(\Nette\Application\UI\Form::FILLED, 'Povinný') | |
->endCondition(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment