Documentation Support > Documentation > Validate
Format: | (:zap validate_<field>="<pattern> ? <field>=<value> : <field>=<value>":) |
(:zap validate_<field>="<pattern> ? <field>=<value> : <field>=<value>" <key>:) |
Requirements to Use: ZAP
Explanation: The validate command checks the value of field1, using the expression matching pattern specified. If it fails, the field2 (can be the same field) is set to the new <value>. Often the field2 would be a warn command, allowing you to stop processing of the form when invalid data is entered. Of course, field1 is triggered if the pattern does match.
Multiple ZAP commands can be executed (CSV list), both when the condition passes or fails. As a security feature, this command can ONLY be set using the (:zap field="value":) format.