Required Field Validator

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
 
M

Mr Carter

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!
 
P

Peter Blum

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top