Last active
December 31, 2015 20:59
-
-
Save raphaeldealmeida/8044065 to your computer and use it in GitHub Desktop.
Exemplos de annotation form builder
This file contains hidden or 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 | |
| use Zend\Form\Annotation; | |
| /** | |
| * @Annotation\Name("Nome do form") | |
| * | |
| * | |
| * Exemplo de text | |
| * @Annotation\Type("Zend\Form\Element\Text") | |
| * @Annotation\Required({"required":"true"}) | |
| * @Annotation\Filter({"name":"StripTags"}) | |
| * @Annotation\Filter({"name":"StringToUpper"}) | |
| * @Annotation\Validator({"name":"StringLength", "options":{"min":"5"}}) | |
| * @Annotation\Options({"label":"Label do elemento:"}) | |
| * Exemplo de select | |
| * @Annotation\Type("Zend\Form\Element\Select") | |
| * @Annotation\Required({"required":"true" }) | |
| * @Annotation\Filter({"name":"StripTags"}) | |
| * @Annotation\Options({"label":"Nota:", | |
| * "value_options" : {"0":"Escolha uma nota","1":"A","2":"B","3":"C"}}) | |
| * @Annotation\Validator({"name":"InArray", | |
| * "options":{"haystack":{"1","2","3"}, | |
| * "messages":{"notInArray":"Por favor escolha uma nota"}}}) | |
| * @Annotation\Attributes({"value":"0"}) | |
| */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment