Internet
All rules in this page can be applies to string
Domain
Validates the input is a valid domain
v.val("google.com", "is domain"); // true
v.val("www.facebook.com", "is domain") // true
Email
Validates the input is an email address
v.val("hello@gmail.com", "is email"); // true
IP address
Validates the input is an ip v4 address
v.val("8.8.8.8", "is ip"); // true
Or private ip address
v.val("192.168.1.1", "is private_ip"); // true
Or IPv6 address
v.val("2001:0db8:85a3:08d3:1319:8a2e:0370:7334", "is ipv6"); // true
URL
Validates the input is a URL(Uniform Resource Locator)
v.val("http://www.example.com/to/path?foo=bar", "is url"); // true
Last updated
Was this helpful?