alpha
Validate that a string contains only Unicode alphabetic characters (matched by \p and \p{M}).
alphaDash
Validate that a string contains only Unicode alphanumeric characters plus dashes and underscores.
alphaNum
Validate that a string contains only Unicode alphanumeric characters (letters and digits).
ascii
Validate that a string contains only ASCII characters from the standard table — horizontal tab, line feed, carriage return, and the printable range (space to ~). Extended ASCII characters fail.
bic
The value must be a valid BIC / SWIFT code — 8 or 11 characters: 4-letter bank code, 2-letter country, 2-character location, and an optional 3-character branch.
contains
Validate that a string contains at least one of the given substrings (case-insensitive).
creditCard
The value must be a valid credit card number — 13–19 digits (spaces and dashes allowed) passing the Luhn checksum.
doesntEndWith
Validate that a string does not end with any of the given substrings (case-insensitive).
doesntStartWith
Validate that a string does not start with any of the given substrings (case-insensitive).
ean
The value must be a valid EAN-8 or EAN-13 barcode (check digit verified).
Validate that a string is a syntactically valid email address (RFC 5322 compliant).
endsWith
Validate that a string ends with at least one of the given substrings (case-insensitive).
equalTo
The value must be exactly equal to the given string (strict equality).
hexColor
Validate that a string is a valid hex color: 3, 4, 6, or 8 hex digits, with an optional leading #.
iban
The value must be a valid IBAN — correct country prefix, expected length (for known countries), and the ISO 7064 mod-97 checksum. Spaces are ignored.
inEnum
The value must be one of a TypeScript enum's values.
inList
The value must be one of the given strings (strict membership via Array.includes).
ip
Validate that a string is a valid IP address (IPv4 or IPv6).
ipv4
Validate that a string is a valid IPv4 address (four 0-255 octets, dotted notation).
ipv6
Validate that a string is a valid IPv6 address. Accepts full and compressed forms.
isbn
The value must be a valid ISBN-10 or ISBN-13 (check digit verified). Spaces and dashes are ignored.
json
Validate that a string parses as valid JSON.
length
Validate that a string has exactly N characters.
longerOrEqualTo
Validate that a string is at least as long as another field's string.
longerThan
Validate that a string is strictly longer than another field's string.
lowercase
Validate that a string is entirely lowercase (no uppercase characters anywhere).
macAddress
Validate that a string is a valid MAC address. Accepts colon-separated, dash-separated, and Cisco dot-separated formats — but the same separator must be used throughout.
maxLength
Validate that a string has at most N characters.
minLength
Validate that a string has at least N characters.
notBlank
Validate that a string is not empty and not whitespace-only.
notContains
Validate that a string contains none of the given substrings (case-insensitive).
notEqualTo
The value must not be exactly equal to the given string (strict equality).
notInList
The value must not be one of the given strings (strict membership via Array.includes).
notRegex
Validate that a string does not match a given regular expression.
phone
The value must be a valid phone number, validated with libphonenumber-js. Without a country the value must be in E.164 format (e.g. +14155552671); pass a country to accept national formats.
postalCode
The value must be a valid postal code. Pass an ISO 3166-1 alpha-2 country code for a country-specific format; otherwise a generic alphanumeric check applies.
regex
Validate that a string matches a given regular expression.
shorterOrEqualTo
Validate that a string is at most as long as another field's string.
shorterThan
Validate that a string is strictly shorter than another field's string.
slug
Validate that a string is a valid URL slug — lowercase alphanumeric characters separated by single dashes, no leading, trailing, or consecutive dashes.
ssn
The value must be a valid US Social Security Number — AAA-GG-SSSS (dashes optional), excluding the ranges the SSA never issues.
startsWith
Validate that a string starts with at least one of the given substrings (case-insensitive).
string
Validate that a value is a string (typeof === 'string'). Companion to Laravel's string rule. Useful when explicit type guarding is needed separately from any other constraint.
ulid
Validate that a string is a syntactically valid ULID — 26 characters in Crockford base32 (excludes I, L, O, U).
uppercase
Validate that a string is entirely uppercase (no lowercase characters anywhere).
url
Validate that a string is a syntactically valid URL.
uuid
Validate that a string is a syntactically valid UUID (versions 1–5, per RFC 4122).
vatNumber
The value must be a valid EU VAT number. Pass an ISO 3166-1 alpha-2 country code to check a specific country's format; otherwise any known EU format is accepted. Spaces are ignored.