$this->broken is a Zend_Form_Element_Text

and that element isRequired and has a AlphaNum validator


Christopher Östlund wrote:
> 
> I'm not fully sure what component you are using, but the reason that both
> messages are sent is surly that you've not set the validation chain to
> break
> on the first error.
> 
> On Tue, May 5, 2009 at 3:56 AM, iceangel89 <[email protected]> wrote:
> 
>>
>> anyone?
>>
>>
>> iceangel89 wrote:
>> >
>> > i tried
>> >
>> > $this->broken->setErrorMessages(array("isEmpty" => "Broken is
>> required",
>> > "notAlpha" => "Not Alpha"));
>> >
>> > but i get both errors as long as 1 validator fails. and i dont think
>> its
>> a
>> > good idea to hardcode the "isEmpty" and stuff? i shld use the constants
>> > defined in the class? whats the right way of customising my messages?
>> and
>> > decorating them? say i want all errors (not just for individual
>> elements)
>> > to be shown at the top of the form. i used getMessages then echo it in
>> a
>> > foreach for now. thats the right way?
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/How-do-i-customise-error-messages--tp23356099p23379784.html
>> Sent from the Zend Framework mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/How-do-i-customise-error-messages--tp23356099p23383752.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to