Email (Basic)
Basic email validation
^[a-zA-Z0-9._%-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$
Email (RFC 5322)
RFC 5322 compliant email
^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$
Codice Fiscale
Italian tax code (Codice Fiscale)
^[A-Z]{6}[0-9]{2}[A-Z][0-9]{2}[A-Z][0-9]{3}[A-Z]$
Partita IVA
Italian VAT number (Partita IVA)
^[0-9]{11}$
URL (HTTP/HTTPS)
HTTP/HTTPS URL validation
^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&//=]*)$
URL (Any Protocol)
Any protocol URL
^[a-zA-Z][a-zA-Z0-9+.-]*:\/\/[^\s]+$
IPv4
IPv4 address
^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$
IPv6
IPv6 address
^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2})$
IPv4 CIDR
IPv4 CIDR notation
^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\/(3[0-2]|[12]?[0-9])$
Visa Card
Visa credit card (13 or 16 digits)
^4[0-9]{12}(?:[0-9]{3})?$
Mastercard
Mastercard credit card
^5[1-5][0-9]{14}$
American Express
American Express card
^3[47][0-9]{13}$
IBAN
International Bank Account Number
^[A-Z]{2}[0-9]{2}[A-Z0-9]{1,30}$
Phone (International)
International phone number (E.164)
^\+?[1-9]\d{1,14}$
Phone (US)
US phone number
^(\+1)?[-.●]?\(?([0-9]{3})\)?[-.●]?([0-9]{3})[-.●]?([0-9]{4})$
Phone (Italian)
Italian mobile phone
^(\+39)?\s?3\d{2}\s?\d{6,7}$
Date (YYYY-MM-DD)
ISO 8601 date format
^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$
Date (DD/MM/YYYY)
European date format
^(0[1-9]|[12]\d|3[01])/(0[1-9]|1[0-2])/\d{4}$
Time (24h)
24-hour time format
^([01]\d|2[0-3]):([0-5]\d)$
UUID v4
UUID version 4
^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
Hex Color
Hexadecimal color code
^#?([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$
Username
Alphanumeric username (3-16 chars)
^[a-zA-Z0-9_-]{3,16}$
Strong Password
Password with uppercase, lowercase, number, and special char
^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{8,}$
MAC Address
MAC address (with : or -)
^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$
Domain Name
Valid domain name
^(?!-)[A-Za-z0-9-]{1,63}(?<!-)\.([A-Za-z]{2,}|xn--[A-Za-z0-9]+)$
JWT Token
JSON Web Token structure
^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$