Check if an input has been filled in or checked.

For example when a title must be entered:

<input type="text" id="title" name="title" value="" />
{% validate id="title" type={presence} %}


Argument Description Example
failure_message Message to be shown when field is empty. Defaults to “*” failure_message="Please enter."

Edit on GitHub

postback Validators json

postback Forms and validation username_unique

Referred by

Forms and validation

You should validate all input data entered in forms. In Zotonic you create forms by writing plain HTML. You can attach…