Go to page content

acceptance

Check if an input value evaluates to true.

Can be used in combination with a check box that must be checked on submit.

For example:

<input type="checkbox" id="accept" name="accept" value="1" />
{% validate id="accept" type={acceptance} %}

Arguments:

ArgumentDescriptionExample
failure_messageMessage to be shown when the input is true. Defaults to "Must be accepted."failure_message="Please agree to our TOS."

This page is part of the Zotonic documentation, which is licensed under the Apache License 2.0.