Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

form validation

Status
Not open for further replies.

123ASP

MIS
Nov 2, 2002
239
0
0
US
hi,

Is there a way to create a function that is smart enough to do all kind of form validation . Basically, I can pass form elements one at a time , then the function can validate for the following:
check if field is either integer ,string or date
Once the datatype is determined, it validates for all kind of things that may go wrong...

this would apply to all element of the form.....

I read about MS vb.Net validation and thought if there is a single function that dose all different validation. If there is such solution, please advice
 
You can add several pre-built validator controls with the ControlToValidate property set to a similar control, but if you'd like a single validator that does more than one type of validation AND has the advantages of the standard validators, look to the CustomValidator. You can assign it both server- and client-side validation functions, and when validation fails, you'll still get the benefit of the error messages/ communication with the ValidationSummary control (if you're using one).

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top