It's been asked before but never properly answered : what are the available options in the Validate Data action? After browsing through the code, here you are.
NOTE: Rules that require a parameter in square brackets require version 6.0.22 or higher.
HOW TO USE:
is_integer : Checks if the value is positive or negative whole number e.g. 123 or -123
decimal : Positive or negative number with REQUIRED decimal point, e.g. 123.45
number : Positive or negative number with OPTIONAL decimal point e.g. 123 or 123.45
match[value] : Does the field match the value? Uses == not ===
different[value] : Is the field NOT equal to the value? Uses != not !==
regex[pattern] : Does the field match the regex pattern? E.g. text/regex[/#^\d{4}$#/]:regex failed! Will show "regex failed!" if the user doesn't enter 4 digits into the 'text' field
contains[value] : Does the field CONTAIN the value? Case insensitive
containsExactly[value] : Does the field contain the value? Case sensitive (capitalisation has to match)
doesntContain[value] : Self explanatory surely? Case insensitive
doesntContainExactly[value] : Same, but case sensitive
minLength[x] : Has to have at least x characters
exactLength[x]
maxLength[x]
minCount[x] : For arrays or selections, e.g. did they select at least X options?
exactCount[x]
maxCount[x]
alpha : Letters only
alphanumeric : Letters and numbers only
nodigit : I assume it means no numbers? The regex is /^[^0-9]+$/
phone : Don't know what country this phone pattern is for. /^\+{0,1}[0-9 \(\)\.\-]+$/
phone_inter : I assume this is for international numbers of some sort. /^\+{0,1}[0-9 \(\)\.\-]+$/
NOTE: Rules that require a parameter in square brackets require version 6.0.22 or higher.
HOW TO USE:
fieldname/rule:Message if the validation fails
or
fieldname/rule[parameter]:Message if the validation fails
is_integer : Checks if the value is positive or negative whole number e.g. 123 or -123
decimal : Positive or negative number with REQUIRED decimal point, e.g. 123.45
number : Positive or negative number with OPTIONAL decimal point e.g. 123 or 123.45
match[value] : Does the field match the value? Uses == not ===
different[value] : Is the field NOT equal to the value? Uses != not !==
regex[pattern] : Does the field match the regex pattern? E.g. text/regex[/#^\d{4}$#/]:regex failed! Will show "regex failed!" if the user doesn't enter 4 digits into the 'text' field
contains[value] : Does the field CONTAIN the value? Case insensitive
containsExactly[value] : Does the field contain the value? Case sensitive (capitalisation has to match)
doesntContain[value] : Self explanatory surely? Case insensitive
doesntContainExactly[value] : Same, but case sensitive
minLength[x] : Has to have at least x characters
exactLength[x]
maxLength[x]
minCount[x] : For arrays or selections, e.g. did they select at least X options?
exactCount[x]
maxCount[x]
alpha : Letters only
alphanumeric : Letters and numbers only
nodigit : I assume it means no numbers? The regex is /^[^0-9]+$/
phone : Don't know what country this phone pattern is for. /^\+{0,1}[0-9 \(\)\.\-]+$/
phone_inter : I assume this is for international numbers of some sort. /^\+{0,1}[0-9 \(\)\.\-]+$/