Client Side OnBlur Triggering Validation

G

Guest

Hello,
Does anyone know how I can stop the RequiredFieldValidator from validation OnBlur and OnChange. I only want it to validate when the user submits the form (but still want it to run client side)

Thanks
 
P

Peter Blum

Two solutions:

1. Disable client side validation. Set EnableClientScript to false on the
validators. Your server side code to validate takes over. (You did write
code to check Page.IsValid, right?)

2. Microsoft's validators are quite limited. I rewrote validation for
ASP.NET to handle a greatly expanded set of possibilities, so that you
wouldn't have to develop custom code or (in this case) hacks. Within
"Professional Validation And More" (http://www.peterblum.com/vam/home.aspx),
you can keep client side validation enabled and disable validation during on
change by setting each validator's EventsThatValidate property to
"OnSubmit". I put together a list of limitations in Microsoft's validators
at http://www.peterblum.com/vam/valmain.aspx to assist users as they design
their site's validation.

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

Joe.Dattilo said:
Hello,
Does anyone know how I can stop the RequiredFieldValidator from
validation OnBlur and OnChange. I only want it to validate when the user
submits the form (but still want it to run client side)
 

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,982
Messages
2,570,190
Members
46,736
Latest member
zacharyharris

Latest Threads

Top