Validation can be applied for text strings, numbers or dates.
Validation applied to a Form will throw an error message for invalid data before the user has tried to save, this is often a better end-user experience.
Validation applied to a Table, is more robust, the user cannot easily avoid it. In most cases it is good to apply both forms of validation.
The following validation rule examples apply to text fields.
Validation code 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 "A*" A text starting with the letter 'A' (or 'a') Is Not Null Any value but null/empty Not Null And Like "T*j*e" Text starting with the letter 'T' (or 't)', followed by zero or more characters (*), followed by a 'j' (or 'J') followed by zero or more characters (*), followed by an e. Null/empty is not allowed. Like "James Joyce" Match "James Joyce" Like "a?b?c" Match an 'a', followed by any single character, followed by a 'b', followed by any single character, followed by a 'c' Like "*@*.*" A very basic email validation rule. This matches any number of characters (including no characters), followed by an @, followed by any number of characters (uncluding no characters), followed by a ., followed by any number of characters (including no characters). Like "??*@??*.??*" A basic email validation rule. Matches at least two characters, followed by an @ sign, followed by at least two characters, followed by a ., followed by at least two characters. Like "bi[nd]" Match "bin" or "bid" Like "??[ab]*" And Not Like "*[q]*" Match two characters, followed by an a or a b, followed by any number of characters and NONE of the characters can be a 'q'. Like "??[ab]*" And Not Like "*[!cab]*" Match two characters, followed by an a or b, followed by any number of characters and ALL of the characters must be c a or b. Like "??#*" And Not Like "*[!0-9]*" Match two characters, followed by a digit, followed by any number of characters and ALL of the characters must be numbers. Like "?*@?*.??*" And Not Like "*[!a-z@=.^_$%!#&'`{|}*?~/-]*" More advanced email validation. Match the pattern "?*@?*.??"
if ALL characters are also part of 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
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
The way dates are interpreted will depend on your locale. Using an ISO 8601 date will avoid any problems caused by regional/locale settings.
Example Matches... >#2025/02/28# Dates after 28 february 2025 Between #2025/02/28# And #2025/03/28# Dates between 28 February and 28 March 2025 >= #2025/02/28# And <= #2025/03/28# Dates between 28 February and 28 March 2025 > #2025/02/28 14:45# Date/Time after 28 February 2025 14:45 > Date() Any date after today's date > Now() Any date/time after the current date/time
When working with dates, also consider using the Format option to display them on a form in the desired way.
âI don't live my life seeking validation from people on social mediaâ ~ Ricki-Lee Coulter