I spent all night trying to figure out why this code doesn't work
$inputFilter = new InputFilter();
$factory = new InputFactory();
$translator = new \Zend\I18n\Translator\Translator();
//Copy of file found in resources/languages/es/Zend_Validate.php
$translator->addTranslationFile('phparray', './module/Product/language/zend_validate.php');
$inputFilter->add(
$factory->createInput(
array(
'name' => 'idpro',
'required' => true,
'filters' => array(
array('name' => 'Int'),
),
)
)
);
$inputFilter->add(
$factory->createInput(
array(
'name' => 'nompro',
'validators' => array(
array(
'name' => 'EmailAddress',
'options' => array(
'translator' => $translator
)
),
),
)
)
);
I've installed php5-intl and enabled it in the php.ini
but it doesnt work i get the same message Value is required and can't be empty but it should be the translated one ...
Thank you very much !