Required Field Validator

  • Thread starter Thread starter Martin
  • Start date Start date
M

Martin

Dear Group

It says in MSDN that a field can be associated with more than one
validators but can one validator be associated with more than one
field? Or do I need a validator for each field? How does it work?
Using Handlers?

Thanks for your efforts!

Martin
 
Each validator can only be used for one field. So you should just use
several validators to validate your entire form.

Like this:

[TextBox] <Required Validator><regular expression validator>
[Textbox2]<Required Validator2><Regular Expression Validator2>

and so on.

Hope that helps!
 
I can offer a commercial solution. My product, Professional Validation And
More (http://www.peterblum.com/vam/home.aspx), includes the
MultiConditionValidator. It lets you combine the evaluation rules behind its
22 validators under a single error message. You can build complex boolean
expressions using those evaluation rules. For example, show the error unless
RequiredText1 AND RequiredText2 are both valid.

--- Peter Blum
www.PeterBlum.com
Email: (e-mail address removed)
Creator of "Professional Validation And More" at
http://www.peterblum.com/vam/home.aspx
 
Back
Top