wilariz wrote > Hi good day..... well in this case select element should be load register > from a databasetable > I have a form "Register" and my select element represents "TypeRegister".. > what type of validation I should do? > this is my select element: > $this->add(array( > 'name' => '_subtipo', > 'type' => 'Zend\Form\Element\Select', > 'options' => array( > 'class' => 'input-medium', > 'value_options' => array(), > 'label' => 'Tipo:', > ) > )); > > and here my simple validator: > $this->add(array( > 'name' => '_subtipo', > 'required' => true > )); > > with this configuration my form fail.. > > Thanks for answer !!
It will fail because there isn't any values in your select list and you set this field as required which means it needs to pass not empty value. ----- Cheers, -- Luke Mierzwa -- View this message in context: http://zend-framework-community.634137.n4.nabble.com/Form-element-select-error-tp4656976p4657017.html Sent from the Zend Framework mailing list archive at Nabble.com. -- List: [email protected] Info: http://framework.zend.com/archives Unsubscribe: [email protected]
