Validation of text fields

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: GaryB (gb_at_prodsol.co.nz)
Date: 11/30/04


Date: 30 Nov 2004 13:08:59 -0800

Hi,

I am trying to validate a text field on a form to the NZ IRD number
format (two digits; hyphen; three digits; hyphen; three digits).

The following validation formula

format([IRD Number], ##-###-####)

generates the following syntax error:

-----------------
Error in Validation formula for "IRD Number" -- the Date Constant is
not valid. Make sure you have entered a valid date in the formula.
-----------------

The following validation formula

format([IRD Number], 12-345-678)

validates

-- 
(two hyphens) as true.  I.e. it forces the hyphens, but doesn't force
the correct number of digits.
Where am I going wrong?
Thanks very much.
Rgds
GaryB


Relevant Pages

  • Re: Validation of text fields
    ... work as a validation formula. ... > format (two digits; hyphen; three digits; hyphen; three digits). ... I.e. it forces the hyphens, ...
    (microsoft.public.outlook.program_forms)
  • Re: Setting Requirements on Forms
    ... FrontPage uses client-side JavaScript for form validation. ... just having 16 digits doesn't make for a valid ... and in the fields collecting the credit card ...
    (microsoft.public.frontpage.programming)
  • Re: Regex help
    ... All indications from your regex show validation ... preceding digits. ... beginning of string assertion ^ is useless when used ... input requirements closer if I was given this assignment. ...
    (comp.lang.perl.misc)
  • Re: COBOL (Fujitsu v3) Data validation.
    ... my main problem is still validating that the user enters 12 digits only. ... >> I am writing a Credit Card program. ... > Let's leave validation of the input for a moment and go for your specific ... Here's a basic programming rule: ...
    (comp.lang.cobol)
  • Re: Advanced RegEx (pattern clustering)
    ... who use regular expressions. ... These 2 digits will always be delimited by punctuation marks. ... Hyphens will always have a single space between the hyphen and ...
    (microsoft.public.dotnet.languages.csharp)