[ZF2 2.0.0rc6] Translating Validator's error messages?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[ZF2 2.0.0rc6] Translating Validator's error messages?

cmple
This post has NOT been accepted by the mailing list yet.
Hi!

How can I translate Validator's error messages within the input filter?

<?php
namespace Application\Form\User;

use Zend\InputFilter\InputFilter;
use Zend\InputFilter\Factory as InputFactory;

class LoginInputFilter extends InputFilter {
        public function __construct() {
                $factory = new InputFactory();
               
                $this->add($factory->createInput(array(
                        'name' => 'identity',
                        'validators' => array(
                                array(
                                        'name' => 'NotEmpty',
                                        'options' => array(
                                                'message' => 'Please Translate Me!'
                                        ),
                                ),
                        ),
               
                )));
....
....
....
}

Thanks!!
Reply | Threaded
Open this post in threaded view
|

Re: [ZF2 2.0.0rc6] Translating Validator's error messages?

cmple
This post has NOT been accepted by the mailing list yet.
Anyone?