problem in custom error message on zend_element
Posted
by user1400
on Stack Overflow
See other posts from Stack Overflow
or by user1400
Published on 2010-04-12T08:18:08Z
Indexed on
2010/04/12
11:23 UTC
Read the original article
Hit count: 219
zend-framework
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
© Stack Overflow or respective owner