The Basics

Simple validation and error display using sf-validate and error-show-text directives.

Live Demo

Source Code

On this form

  • Add validation to form element using sf-validate:[type]
  • Return errors to an element using the directive error-show-text:[field_name]

    This directive has two actions:

    • show - Unhide this element if 'field' had an error
    • text - Inject the error's text into the element

    It could also be written as two separate directives:

    • error-show:[field_name]
    • error-text:[field_name]

Documentation Reference