Avatar of regulatorz
regulatorz

asked on 

One Validator to validate multiple controls?

Hi, I'm creating a registration page for a website.  On it, the user needs to enter their birthdate.  I have 3 textbox controls, one for month, one ofr day, and one for year for the user to input their birthdate.  Right I have to create 3 seperate RequiredFieldValidator to make sure user put something in those 3 textboxes, then I have 3 different CustomValidator to validate that they have entered the correct dates.  i.e. making sure no1 put 9999 or 1000 as their birth year or put 30 as their birth month.  My question is, is there a way to just have one custom validator to do all that? Instead of checking one TextBox at a time, can I do something to check all 3 at the sametime and just output 1 error message instead of 3 seperate ones? thanks!
.NET Programming

Avatar of undefined
Last Comment
kingwr12
ASKER CERTIFIED SOLUTION
Avatar of kingwr12
kingwr12
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
.NET Programming
.NET Programming

The .NET Framework is not specific to any one programming language; rather, it includes a library of functions that allows developers to rapidly build applications. Several supported languages include C#, VB.NET, C++ or ASP.NET.

137K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo