Zend InputFilter requires intl PHP extension? -
i setting filters , validators form, when submit it, error appears: "zend\i18n\filter component requires intl php extension". because of alnum , alpha validators ?
code:
public function getinputfilter() { if (!$this->inputfilter) { $inputfilter = new inputfilter(); $inputfilter->add(array( 'name' => 'email', 'required' => true, "filters" => array( array('name' => 'stringtrim'), array('name' => 'striptags')), 'validators' => array( array( 'name' => 'regex', 'options' => array( 'pattern' => '/^[a-za-z0-9.!#$%&\'*+\/=?^_`{|}~-]+@[a-za-z0-9-]+(?:\.[a-za-z0-9-]+)*$/', 'messages' => array( regex::not_match => 'Е-майл адреса е невалиден.', ), ), 'break_chain_on_failure' => true ), array( 'name' => 'emailaddress', 'options' => array( 'messages' => array( emailaddress::invalid_format => "Е-майл адреса е невалиден.", emailaddress::invalid => "", emailaddress::invalid_local_part => "", emailaddress::invalid_hostname => "", emailaddress::invalid_segment => "", emailaddress::dot_atom => "", emailaddress::invalid_mx_record => "", ), ), ), ), )); $inputfilter->add((array( 'name' => 'name', 'required' => true, "filters" => array( array('name' => 'stringtrim'), array('name' => 'striptags')), 'validators' => array( array( 'name' => 'alpha', ), ), ))); $inputfilter->add((array( 'name' => 'password', 'required' => true, "filters" => array( array('name' => 'stringtrim'), array('name' => 'striptags')), 'validators' => array( array( 'name' => 'alnum', ), array( 'name' => 'stringlength', 'options' => array( 'min' => 6, 'max' => 12, 'messages' => array( stringlength::invalid => "Паролата трябва да е от 6 до 12 символа", ), ), ), ), ))); }
fixed going php.ini , uncommenting extension=php_intl.dll
Comments
Post a Comment