Last active
September 14, 2018 11:06
-
-
Save Kcko/8777baec32bf6ce3ef451975763ba7e9 to your computer and use it in GitHub Desktop.
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
<?php | |
->addCondition(function() use ($form) { | |
return ...; //true nebo false | |
}) |
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
<?php | |
1) | |
$videoLength = $video->addText('videoLength', 'Délka videa'); | |
$videoLength->addConditionOn($form['article-published'], Form::EQUAL, TRUE) | |
->setRequired(); | |
$videoLength->addCondition(Form::FILLED) | |
->addRule(Form::PATTERN | |
2) | |
$video->addText('videoLength', 'Délka videa') | |
->addConditionOn($form['article-published'], Form::EQUAL, TRUE) | |
->setRequired() | |
->endCondition() | |
->addCondition(Form::FILLED) | |
->addRule(Form::PATTERN, 'Délka musí být zadána ve formátu minuty:sekundy', '[0-9]+:[0-9]{2}'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment