473,490 Members | 2,703 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Custom Validation for dates

Hi All

I am looking to utilise the validation controls to validate a date of
birth, however, I would like to take it one step further than just
making sure that the user has entered a date.

I have three text boxes for each part of the date (DD, MM, YYYY) and
firstly I would like to make sure that a valid date has been entered.
Further to that, I would like to also check that if chkChild has been
ticked, the age is under to 16.

Is this possible, or am I going to be best off writing the validation
in my own function?

Many thanks

Darren

Jun 8 '06 #1
2 1602
Combine Text from these controls in one string and use Regexp
Hi All

I am looking to utilise the validation controls to validate a date of
birth, however, I would like to take it one step further than just
making sure that the user has entered a date.

I have three text boxes for each part of the date (DD, MM, YYYY) and
firstly I would like to make sure that a valid date has been entered.
Further to that, I would like to also check that if chkChild has been
ticked, the age is under to 16.

Is this possible, or am I going to be best off writing the validation
in my own function?

--
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche

Jun 8 '06 #2
Can I do this in a CustomValidation control, and if so, how do I go
about doing it?

Many thanks

Darren

Michael Nemtsev wrote:
Combine Text from these controls in one string and use Regexp
Hi All

I am looking to utilise the validation controls to validate a date of
birth, however, I would like to take it one step further than just
making sure that the user has entered a date.

I have three text boxes for each part of the date (DD, MM, YYYY) and
firstly I would like to make sure that a valid date has been entered.
Further to that, I would like to also check that if chkChild has been
ticked, the age is under to 16.

Is this possible, or am I going to be best off writing the validation
in my own function?

--
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche


Jun 8 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

30
3637
by: Dr John Stockton | last post by:
It has appeared that ancient sources give a method for Numeric Date Validation that involves numerous tests to determine month length; versions are often posted by incomers here. That sort of code...
2
3704
by: Barbara Alderton | last post by:
I setup some standard Required Field Validation controls and one Custom validation control on an ASP.NET page (within a user control) to validate text entry. I also setup a Summary Control to post...
3
1700
by: Vi | last post by:
Hi, I have a form which displays some orders based on dates selected or based on an order number. I have two different buttons for each kind of query, but both buttons call the same method in the...
5
4875
by: JIM.H. | last post by:
Hello, I have this validation expression: ^(?:(?:0?|1)|(?:0?|11)(?!\/31)|(?:0?2)(?:(?!\/3|\/29\/(?:(?:0||)00|(?:\d{2}(?:0||))))))\/(?:0?||3)\/\d{4}$ This is supposed to match MM/DD/YYYY it is...
1
2757
by: Elie Medeiros via .NET 247 | last post by:
Hi there, I have written a custom validator function to validate a datefrom a user-filled field. The function tries to parse the dateand if it can't, sets (serverValidateEventArgs)e.IsValid...
2
6723
by: John Smith | last post by:
Hello, I have a VB.NET application with a Windows form that have several textboxes fields where I have dates entered. I would like to do a date validation check after the the field is updated, so...
8
3898
by: Radu | last post by:
Hi. I have an ASP control on my page: <asp:Calendar ID="calStart" ................ Etc </asp:Calendar> and I have a Custom Validator defined as <asp:CustomValidator
2
19391
hyperpau
by: hyperpau | last post by:
Before anything else, I am not a very technical expert when it comes to VBA coding. I learned most of what I know by the excellent Access/VBA forum from bytes.com (formerly thescripts.com). Ergo, I...
0
2897
hyperpau
by: hyperpau | last post by:
Before anything else, I am not a very technical expert when it comes to VBA coding. I learned most of what I know by the excellent Access/VBA forum from bytes.com (formerly thescripts.com). Ergo, I...
0
7112
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7146
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7183
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6852
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7356
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
3074
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1389
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
628
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
277
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.