Created
October 14, 2012 07:04
-
-
Save noopable/3887684 to your computer and use it in GitHub Desktop.
Input def sample
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 | |
$inputFilter = $form->getInputFilter(); | |
$spec = array( | |
'name' => 'an_element_name', | |
'required' => true, | |
'filters' => array( | |
array('name' => 'Zend\Filter\StringTrim'), | |
), | |
'validators' => array( | |
array( | |
'name' => 'NotEmpty', | |
'break_chain_on_failure' => true, | |
'options' => array( | |
'translatorTextDomain' => 'foo_translate_scope', | |
'message' => 'hole message', | |
), | |
), | |
), | |
); | |
$inputFilter->add($spec, 'an_element_name'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment