View Single Post
  #1  
Old February 28th, 2005, 09:09 PM
stefan
external usenet poster
 
Posts: n/a
Default Validation Rules

Hi There,

I'm tring to create a validation rule for a field that should receive
something like:

001-30W4/2

where first group of three digits is from 001 to 126;

the secoud grop of two digits is from 01 to 30

the digit after 'W' could be only 4, 5 or 6
and the digit after '/' is from 0 to 9 except 1 (can't be 1)

I created this validation rule:

Imput Mask: 000\-00"W"0\/0;0;#

Validation Rule: Like '[0,1][0-2][0-6]-[0-2][0-9]W[4,5,6]/#'

the problem is that it takes 000 for the first group, I miss 30 for the
secoud group of digits (goes from 01 to 29)
and for the last digit after '/' it accepts 1 too

If someone could help me in creating this validation rule pattern that would
be more appreciated.

Thanks,
Stefan