Required!
Field is required :
Optional
Field is optional :
Placeholder & required
Field is required :
Favorite sport 1:
Choose a sport
Tennis
Football
Golf
Favorite sport 2:
Choose a sport
Tennis
Football
Golf
validate[required]
Custom
Comes with many predifined regex (phone, url, ip, email..etc)
[DEMO]
Enter a URL :
validate[required,custom[url]]
Equals
Password :
Confirm password :
validate[required,equals[password]]
Function
Write 'HELLO' :
validate[required,funcCall[checkHELLO]]
Conditional required
Depending field (1):
This field is required if above field has a value :
validate[condRequired[dep1]]
OR with 2 depending fields
Depending field (2a) :
Depending field (2b) :
This field is required if any of above fields has a value :
validate[condRequired[dep2a,dep2b]]
MinSize
Minimum field size
validate[required,minSize[6]]
MaxSize
Maximum field size, optional
validate[maxSize[6]]
note that the field is optional - it won't fail if it has no value
Min
integer >= -5
validate[required,custom[integer],min[-5]]
Max
integer ,50]
validate[required,custom[integer],max[50]]
Past
Checks that the value is a date in the past
Please enter a date ealier than 2010/01/01
validate[custom[date],past[2010/01/01]]
Future
Checks that the value is a date in the future
Please enter a date older than today's date
validate[custom[date],future[NOW]]
Group required
Checks if at least one of the input is not empty.
Please enter a credit card
OR
Please enter a paypal acccount
OR
Please enter a bank account
OR
Please choose from select
Choose a payment option
Paypal
Bank account
Date Range
Checks that the start date is before the end date. Please enter an end date ealier than the start date
Start Date :
End Date :
validate[dateRange[grp1]]
Note* Both fields must have the same name
Field is required with function :
Date Time Range
Checks that the start date and time are before the end date and time. Please enter an end date ealier than the start date
Start Date Time:
End Date Time:
validate[dateTimeRange[grp2]
Note* Both fields must have the same name
Date compare
Checks that the first date is before the second date. Please enter the second date ealier than the first date
First Date :
Disable first date field
validate[custom[date],past[#dateCmp2]]
Second Date :
Disable second date field
validate[custom[date],future[#dateCmp1]]
Credit Card
Checks that the credit card number is at least theoretically valid, according the to the
Luhn checksum algorithm
, but not whether the specific card number is active with a bank, etc.
Since credit cards are often presented in different formats, spaces and hyphens (' ','-') are simply ignored.
Examples:
4111 1111 1111 1111
3737-321345-610004
More examples
validate[required,creditCard]