I have the following problem. I wrote (based on a tutorial) form validation. Text fields work fine, but an integer field behaves oddly.
This is my validator:
$inputFilter->add($factory->createInput(array( 'name' => 'zip', 'required' => false, 'filters' => array( array('name' => 'Int'), ), )));
It is inside my Entity.php, like other filters. It is strange that this element even accepts a string, but ignores the required when I set it to true . I tried replacing Int with Digits , which then makes the form accept required , but accept strings anyway.
Any ideas? Thanks!
source share