Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net (http://www.velocityreviews.com/forums/f29-asp-net.html)
-   -   validate Date input using Custom Validator (http://www.velocityreviews.com/forums/t70988-validate-date-input-using-custom-validator.html)

Grey 01-20-2004 09:55 AM

validate Date input using Custom Validator
 
how to use Custom Validator to valid the date input, such as Feb does not have 30th or April does not have 31st....
I don't want to use Calender control...

Michael 01-20-2004 02:25 PM

Re: validate Date input using Custom Validator
 
If you don't "have" to use the custom validator, then why not use a compare
validator? Set the Operator property of the validator to "DataTypeCheck",
and the Type property to "Date".

It's pretty smart too, I just tested it out and it validated (even on client
side), leap years, and everything you mentioned in your post.

--Michael



vikysaran 02-20-2008 12:57 PM

Quote:

Originally Posted by Michael
If you don't "have" to use the custom validator, then why not use a compare
validator? Set the Operator property of the validator to "DataTypeCheck",
and the Type property to "Date".

It's pretty smart too, I just tested it out and it validated (even on client
side), leap years, and everything you mentioned in your post.

--Michael

I'm getting Error "The value '' of the ValueToCompare property of 'CompareValidator1' cannot be converted to type 'Date'. "

using visual studio 2005

tswachter 02-01-2009 04:33 PM

Change the Operator Property
 
The operator property for the compare validator must be set to "DataTypeCheck"

Check MSDN for detail msdn.microsoft.com/en-us/library/ad548tzy.aspx

grish 10-09-2012 06:11 AM

hiii i tried ur way bt i wish to validate only one field of date and if i use compare validator dn what shall i enter in controltovalidate and controltocompare.


All times are GMT. The time now is 09:07 PM.

Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57