Issues

ZF-4678: Improved error message for isEmpty

Description

REGARDING Zend_Validate_NotEmpty

PROBLEM The current error message is written in a complicated way. I know it's not a priority for the ZF team to make minor adjustments to error messages there are specific reasons: 1. Since this particular validator is often added by default, at validation time, there is no easy way to modify the error message using setMessage without adding the validator to all relevant elements. 2. Furthermore it's probably the most common error message, and could deserve some extra attention because of that.

Thus the reason for a global, improved error message.

Current error message: self::IS_EMPTY => "Value is empty, but a non-empty value is required"

Suggested error message1: self::IS_EMPTY => "Required and can't be empty."

Suggested error message2: self::IS_EMPTY => "[LABEL_VALUE_HERE] is required and can't be empty."

Comments

You must fill this in. Is maybe even more non technical :d

The second is not possible... The label value is not given to the validator so the validator can not add the label to it's error message. And the value itself would bring nothing as it's empty.

Changed with r13226