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.

  • 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.

  • numericality

    Numerical input and range check.

  • postback

    Server side validation.

  • presence

    Check if an input has been filled in or checked.