problem in custom error message on zend_element
- by user1400
hello all
i created a text element like following code
$test = $this->createElement('text', 'test');
$test->setLabel('test:');
$test->addValidator(new Zend_Validate_Int());
$test->addErrorMessages(array('isEmpty'=>'u should enter a number','%value% is not integer'));
$shomare->setRequired(true);
$this->addElement($test);
when i set empty or non integer number to textbox ,
it show both its own error message ,
if its empty errormessage="u should enter a number"
and when it is not a valid integer it shows '%value% is not integer'
thanks