Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Verifying Format
Message
From
31/08/2004 10:06:43
 
 
To
31/08/2004 09:51:20
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00937996
Message ID:
00938003
Views:
21
You can use regular expression to verify the format of the zip code and the phone number. Take a look at these sites on how to use them:

http://fox.wikis.com/wc.dll?Wiki~RegExp~VFP
http://www.regexlib.com/
http://www.regexlib.com/REDetails.aspx?regexp_id=837 (ZIP)
http://www.regexlib.com/REDetails.aspx?regexp_id=536 (phone)

HTH

>I am running validation code against fields such as Zip Code, phone no and date fields. The format are as follows:
>
>Zip Code: Chara, format 99999-9999
>Phone No: chara, format (999) 999-9999
>
>How can I ensure and validate against users that may only enter the zip code as:
>
>300. Anything less than the first 5 should trigger the error. I dont care if they enter teh format 31030-blank. I just dont want them to enter the format as 300 - blank.
>
>How can I ensure that the phone numbers are entered int eh correct format also. Prevent them from only entering the prefix and last four and not the area code...ie ( ) 555-1212
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform