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~VFPhttp://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