0% found this document useful (0 votes)
46 views

The Following Validation Rule Examples Apply To Text Fields

The document provides examples of validation rules that can be applied to text, number, and date fields. For text fields, examples include rules to match specific strings, numbers of certain lengths, names, emails, and allow only certain characters. Number field rules given include checks for positive numbers, ranges, and specific values. Date field rules demonstrate validating for dates after or between certain dates, as well as using current or now values.

Uploaded by

Haseeb Khan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
46 views

The Following Validation Rule Examples Apply To Text Fields

The document provides examples of validation rules that can be applied to text, number, and date fields. For text fields, examples include rules to match specific strings, numbers of certain lengths, names, emails, and allow only certain characters. Number field rules given include checks for positive numbers, ranges, and specific values. Date field rules demonstrate validating for dates after or between certain dates, as well as using current or now values.

Uploaded by

Haseeb Khan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

The following validation rule examples apply to text fields.

Example Matches...

Like "[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]" A number consisting of 8 digits

Like "########" A number consisting of 8 digits

Like "????" 4 characters

Like "K*" A text starting with the letter K or k

Is Not Null Any value but null/empty

A text staring with the letter K/k, followed by zero


or more characters (*), followed by a i/I, followed
Not Null And Like "K*i*e"
by zero or more characters (*), followed by an e.
Null/empty is not allowed.

Like "James Joyce" Matches "James Joyce"

Matches an a, followed by any single character,


Like "a?b?c" followed by a b, followed by any single character,
followed by a c

A very basic email validation rule. This matches any


number of characters (including no characters),
followed by an @, followed by any number of
Like "*@*.*"
characters (uncluding no characters), followed by
a ., followed by any number of characters (including
no characters).

A basic email validation rule. Matches at least two


characters, followed by an @ sign, followed by at
Like "??*@??*.??*"
least two characters, followed by a ., followed by at
least two characters.

Like "bi[nd]" Matches "bin" or "bid"

Matches two characters, followed by an a or a b,


Like "??[ab]*" And Not Like "*[q]*" followed by any number of characters and NONE of
the characters can be a q.

Matches two characters, followed by an a or b,


Like "??[ab]*" And Not Like "*[!qab]*" followed by any number of characters and ALL of
the characters must be q, a or b.

Like "??#*" And Not Like "*[!0-9]*" Matches two characters, followed by a digit,
followed by any number of characters and ALL of
the characters must be numbers.

More advanced email validation. Matches the


Like "?*@?*.??*" And Not Like "*[!a-z@=.^_$%!
pattern "?*@?*.??" if ALL characters are part of the
#&'`{|}*?~/-]*"
the [a-z@=.^_$%!#&'`{|}*?~/-] character collection.

Not Like "*[!a-z]*" Letters only

Not Like "*[!a-z ]*" Letters and spaces only

Not Like "*[!0-9a-z]*" Letters and numbers only

Not Like "*[!0-9a-z -]*" Letters, numbers, spaces and hyphens (-) only

"Jack" Or "John" Or "Marc" Jack, John or Marc

Number validation rule examples


The following validation rule examples apply to Number fields.

Example Matches...

>0 Positive numbers only, excluding 0

>= 0  Positive numbers only, including 0

>= 0 And <= 100 Between 0 and 100, including 0 and 100

Between 0 And 100 Between 0 and 100, including 0 and 100

In(1,2,3,4,5) 1,2,3,4 or 5

1 Or 2 Or 3 Or 4 Or 5 1,2,3,4 or 5

Date validation rule examples


The following validation rile examples apply to dates. Note that the way dates are written
depends on your locale. The examples below use a European date format (dd-mm-yyyy).

Example Matches...

>#28/2/1990# Dates after 28 februari 1990

Between #28/2/1990# And #5/3/1990# Dates between 28 februari and 5 march 1980

>= #28/2/1980# And <= #5/3/1990# Dates between 28 februari and 5 march 1980

> #28/2/1990 13:45# Date/Time after 28 februari 1990 13:45


> Date() Dates after todays date

> Now() Date/Time after the current Date/Time

You might also like