Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
zend framework validators
Old 02-27-2008, 10:39 AM zend framework validators
Super Talker

Posts: 130
Trades: 0
I'm trying to add custom messages to the validators. Here is my code which I believe is exactly how it's supposed to be:

PHP Code:
$group->addValidator('alnum'false, array('messages' => array("notAlnum"=>"Not Alphanumeric""stringEmpty"=>"Required"))); 
Here is a quote from the zend framework page on validators:

Quote:
Providing Custom Validator Error Messages

Some developers may wish to provide custom error messages for a validator. Zend_Form_Element::addValidator()'s $options argument allows you to do so by providing the key 'messages' and setting it to an array of key/value pairs for setting the message templates. You will need to know the error codes of the various validation error types for the particular validator.
http://framework.zend.com/manual/en/....elements.html

My code is not overwriting the message and it is still returning the default message. Does anyone know how to get this to work.
__________________
flann

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
flann is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Reply     « Reply to zend framework validators
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.12218 seconds with 12 queries