ZF-6710: Describe an ability to provide messages array for all specified validator

Description

Describe an ability to provide messages array for all specified validator (without requirements to specify validator index).

So the code:


$validators = array(
    'month' => array(
        new Zend_Validate_Between(1, 12),
        'messages' => array(
            array(
                Zend_Validate_Between::NOT_BETWEEN =>
                    'Month value %value% must be between ' .
                    '%min% and %max%',
                Zend_Validate_Between::NOT_BETWEEN_STRICT =>
                    'Month value %value% must be strictly between ' .
                    '%min% and %max%'
            )
        )
    )
);

will be transformed to


$validators = array(
    'month' => array(
        new Zend_Validate_Between(1, 12),
        'messages' => array(
                Zend_Validate_Between::NOT_BETWEEN =>
                    'Month value %value% must be between ' .
                    '%min% and %max%',
                Zend_Validate_Between::NOT_BETWEEN_STRICT =>
                    'Month value %value% must be strictly between ' .
                    '%min% and %max%'
        )
    )
);

Comments

Done.