Advanced Validation

URL validation, date validation, min/max constraints, and field comparison rules.

Live Demo

Source Code

On this form

  • Return errors using error-show-text:[field_name]
  • Add validation using sf-validate:[type]
    • sf-validate:url - Validates URL pattern
    • sf-validate:active_url - Validates domain actually exists
    • sf-validate:boolean - True/False 1 or 0
    • sf-validate:min[value] - Number cannot be less than
    • sf-validate:max[value] - Number cannot be more than
    • sf-validate:in[val1,val2,..] - Exact result required
    • sf-validate:after[date] - Date validation after
    • sf-validate:same[other_field] - Ensures two fields match
    • sf-validate:accepted - True, yes or 1

Documentation Reference