Go to page content

presence

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} %}

Extra arguments:

ArgumentDescriptionExample
failure_messageMessage to be shown when field is empty.  Defaults to "*"failure_message="Please enter."

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