m. lemos forms validation class

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
How do you validate a SELECT field with m. lemos forms validation
class. I want to make sure the user has selected a product and not left
the field as the default of 'Select One'.

"SelectOne"=>"Select One",
"ValidationErrorMessage"=>"Please specify a product.",

Thanks for any input you can give.
P.S. Manuel this is an awesome class. Great Work!!


Re: m. lemos forms validation class


on 12/20/2004 11:26 PM diroddi said the following:
Quoted text here. Click to load it

I guess I need to have a FAQ system for recurring questions! ;-)

What I usually do is to have one option selected by default with an
empty string as value.

  ""=>"Select One",

This way the ValidateAsNotEmpty will make the class prevent the default
empty string value to be accepted.

Quoted text here. Click to load it

Thanks. ;-)

BTW, for comments or questions specific to the forms class, it was just
launched a forum system built in the PHP Classes site meant for authors
to provide support to their class users. For this class the forum page
is located here.

http://www.phpclasses.org/discuss/package/1 /


Manuel Lemos

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org /

PHP Reviews - Reviews of PHP books and other products
http://www.phpclasses.org/reviews /

Metastorage - Data object relational mapping layer generator

Site Timeline