How validate a date or phone field value

G

Guest

Can anyone tell me what function exists to check the validity of user input
in a date and phone field. I have used the inputmask for both fields. I'm
trying to trap the error if the user doesn't complete the field and tries to
move out of the field. I want to write a more user friendly error than the
default error message.
 
D

David Lloyd

For dates, the IsDate function is appropriate. For phone numbers, you can
test for numeracy with the IsNumeric function as well as test for length
with the Len function. A local phone number would be a length of seven and
with the area code a length of ten, of course.

--
David Lloyd
MCSD .NET
http://LemingtonConsulting.com

This response is supplied "as is" without any representations or warranties.


Can anyone tell me what function exists to check the validity of user input
in a date and phone field. I have used the inputmask for both fields. I'm
trying to trap the error if the user doesn't complete the field and tries to
move out of the field. I want to write a more user friendly error than the
default error message.
 

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

Top