Go to page content

Validators

Validators for HTML form fields.

Validators check if form fields have an acceptable value. They check both client side and server side if the input fields are valid.

When an input field has been verified then it is available to Erlang programs via the function z_context:get_q_validated/2.

When a client side input field does not validate on the server side then the complete form submit is refused.

See also the {% validate %} scomp.

Search the documentation

  • acceptance

    Check if an input value evaluates to true.

  • confirmation

    Check if two inputs are the same.

  • date

    [0.8+] Validate input date against a given date format.

  • email

    Check if the content of the input field is an e-mail address.

  • format

    Regular expression test.

  • length

    Check the length of a text input.