On Thu, Feb 5, 2009 at 10:08 PM, A.J. Brown <fynw...@gmail.com> wrote: > > > On Wed, Feb 4, 2009 at 9:44 PM, Deepak Shrestha <d88...@gmail.com> wrote: >> >> Thanks. How about assigning specific error message to each validator? >> > > Use the options array (3rd parameter). The key should be 'messages' and the > value is another array for each message type that validator can throw. > You'll have to look at the validator class to see what message types it can > throw. > > example (I took this from a zfforums post I just read right before seeing > this :)): > > $username->addValidator( > 'alnum', > true, > array( > 'messages' => array( > 'notAlnum' => 'message for sting that isnt alnum', > 'stringEmpty' => 'message if field is empty' > ) > ) > ); > > > -- > A.J. Brown > web | http://ajbrown.org > phone | (937) 660-3969 >
Thanks again -- ======================= Registered Linux User #460714 Currently Using Fedora 8, 10 =======================