Building with AI?
llms.txt
Advanced Validation
URL validation, date validation, min/max constraints, field matching, and more.
Live Demo
Source Code
Validation Rules Reference
String & Format Rules
sf-validate:required- Must have a valuesf-validate:email- Valid email formatsf-validate:url- Valid URL patternsf-validate:active_url- URL with existing domainsf-validate:alpha- Letters onlysf-validate:alpha_num- Letters and numberssf-validate:alpha_dash- Letters, numbers, dashes, underscores
Length & Size Rules
sf-validate:min[5]- Minimum value (number) or length (string)sf-validate:max[100]- Maximum value or lengthsf-validate:min_length[8]- Minimum character lengthsf-validate:max_length[255]- Maximum character lengthsf-validate:between[1,10]- Value between range
Comparison & Matching Rules
sf-validate:same[other_field]- Must match another fieldsf-validate:different[other_field]- Must differ from another fieldsf-validate:in[a,b,c]- Must be one of the valuessf-validate:not_in[x,y,z]- Must not be any of the valuessf-validate:starts_with[+]- Must start with stringsf-validate:ends_with[.com]- Must end with string
Date Rules
sf-validate:date- Valid date formatsf-validate:after[tomorrow]- Date after referencesf-validate:before[2025-12-31]- Date before referencesf-validate:after_or_equal[today]- Date on or aftersf-validate:before_or_equal[other_field]- Date on or before another field
Boolean & Checkbox Rules
sf-validate:boolean- Must be true/false, 1/0, yes/nosf-validate:accepted- Must be checked/true/yes/1