How to disable html5 validation?(Leave post validation)(zend framework2) -


i'm using select2 plugin if have error on client side(html5) shows me in wrong position,because of select2 plugin.(the position of element)

disable html5 validation 1 specific element leave post validation.

$inputfilter = new inputfilter();     $this->add(array(                 'name' => 'suppliername',                 'type' => 'text',                 'attributes' => array('id'=>'suppliername','required' => true)             )); $this->setinputfilter($inputfilter); 

disable validation on form definition:

// example inside form setup..

$this->add(array(     'name' => 'fieldname',     'attributes' => array(         'type'  => 'text',         'class' => 'something',         'required'  => false,     ),     'options' => array           'label' => 'some field',     ), )); 

but leave enabled in input filter definition

// example in input filter setup ..

$inputfilter->add($factory->createinput(array(     'name'     => 'fieldname',     'required' => true,     'filters'  => array(         array('name' => 'int'),     ), ))); 

it's form definition decide if input field gets required attribute applied.

the actual input filter decides if it's required when validating data (post or ever)

i believe allow field left blank without using client side required check, check make sure field required when input filter validation checks performed.


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -