@Contains(seed: string) | Checks if the string contains the seed. |
@NotContains(seed: string) | Checks if the string not contains the seed. |
@IsAlpha() | Checks if the string contains only letters (a-zA-Z). |
@IsAlphanumeric() | Checks if the string contains only letters and numbers. |
@IsDecimal(options?: IsDecimalOptions) | Checks if the string is a valid decimal value. Default IsDecimalOptions are force_decimal=False, decimal_digits: '1,', locale: 'en-US'. |
@IsAscii() | Checks if the string contains ASCII chars only. |
@IsBase32() | Checks if a string is base32 encoded. |
@IsBase58() | Checks if a string is base58 encoded. |
@IsBase64(options?: IsBase64Options) | Checks if a string is base64 encoded. |
@IsIBAN() | Checks if a string is an IBAN (International Bank Account Number). |
@IsBIC() | Checks if a string is a BIC (Bank Identification Code) or SWIFT code. |
@IsByteLength(min: number, max?: number) | Checks if the string's length (in bytes) falls in a range. |
@IsCreditCard() | Checks if the string is a credit card. |
@IsCurrency(options?: IsCurrencyOptions) | Checks if the string is a valid currency amount. |
@IsISO4217CurrencyCode() | Checks if the string is an ISO 4217 currency code. |
@IsEthereumAddress() | Checks if the string is an Ethereum address using basic regex. Does not validate address checksums. |
@IsBtcAddress() | Checks if the string is a valid BTC address. |
@IsDataURI() | Checks if the string is a data uri format. |
@IsEmail(options?: IsEmailOptions) | Checks if the string is an email. |
@IsFQDN(options?: IsFQDNOptions) | Checks if the string is a fully qualified domain name (e.g. domain.com). |
@IsFullWidth() | Checks if the string contains any full-width chars. |
@IsHalfWidth() | Checks if the string contains any half-width chars. |
@IsVariableWidth() | Checks if the string contains a mixture of full and half-width chars. |
@IsHexColor() | Checks if the string is a hexadecimal color. |
@IsHSL() | Checks if the string is an HSL color based on the CSS Colors Level 4 specification. |
@IsRgbColor(options?: IsRgbOptions) | Checks if the string is a rgb or rgba color. |
@IsIdentityCard(locale?: string) | Checks if the string is a valid identity card code. |
@IsPassportNumber(countryCode?: string) | Checks if the string is a valid passport number relative to a specific country code. |
@IsPostalCode(locale?: string) | Checks if the string is a postal code. |
@IsHexadecimal() | Checks if the string is a hexadecimal number. |
@IsOctal() | Checks if the string is an octal number. |
@IsMACAddress(options?: IsMACAddressOptions) | Checks if the string is a MAC Address. |
@IsIP(version?: "4"|"6") | Checks if the string is an IP (version 4 or 6). |
@IsPort() | Checks if the string is a valid port number. |
@IsISBN(version?: "10"|"13") | Checks if the string is an ISBN (version 10 or 13). |
@IsEAN() | Checks if the string is an EAN (European Article Number). |
@IsISIN() | Checks if the string is an ISIN (stock/security identifier). |
@IsISO8601(options?: IsISO8601Options) | Checks if the string is a valid ISO 8601 date format. Use the option strict = true for additional checks for a valid date. |
@IsJSON() | Checks if the string is valid JSON. |
@IsJWT() | Checks if the string is valid JWT. |
@IsObject() | Checks if the object is a valid Object (null, functions, arrays will return false). |
@IsNotEmptyObject() | Checks if the object is not empty. |
@IsLowercase() | Checks if the string is lowercase. |
@IsLatLong() | Checks if the string is a valid latitude-longitude coordinate in the format lat, long. |
@IsLatitude() | Checks if the string or number is a valid latitude coordinate. |
@IsLongitude() | Checks if the string or number is a valid longitude coordinate. |
@IsMobilePhone(locale: string) | Checks if the string is a mobile phone number. |
@IsISO6391() | Checks if the string is a valid ISO 639-1 officially assigned language code. |
@IsISO31661Alpha2() | Checks if the string is a valid ISO 3166-1 alpha-2 officially assigned country code. |
@IsISO31661Alpha3() | Checks if the string is a valid ISO 3166-1 alpha-3 officially assigned country code. |
@IsISO31661Numeric() | Checks if the string is a valid ISO 3166-1 numeric officially assigned country code. |
@IsLocale() | Checks if the string is a locale. |
@IsPhoneNumber(region: string) | Checks if the string is a valid phone number using libphonenumber-js. |
@IsMongoId() | Checks if the string is a valid hex-encoded representation of a MongoDB ObjectId. |
@IsMultibyte() | Checks if the string contains one or more multibyte chars. |
@IsNumberString(options?: IsNumericOptions) | Checks if the string is numeric. |
@IsSurrogatePair() | Checks if the string contains any surrogate pairs chars. |
@IsTaxId() | Checks if the string is a valid tax ID. Default locale is en-US. |
@IsUrl(options?: IsURLOptions) | Checks if the string is a URL. |
@IsMagnetURI() | Checks if the string is a magnet uri format. |
@IsUUID(version?: UUIDVersion) | Checks if the string is a UUID (version 1-8, nil, max, loose, all). Also accepts array of versions. |
@IsFirebasePushId() | Checks if the string is a Firebase Push ID. |
@IsUppercase() | Checks if the string is uppercase. |
@Length(min: number, max?: number) | Checks if the string's length falls in a range. |
@MinLength(min: number) | Checks if the string's length is not less than given number. |
@MaxLength(max: number) | Checks if the string's length is not more than given number. |
@Matches(pattern: RegExp, modifiers?: string) | Checks if string matches the pattern. Either matches('foo', /foo/i) or matches('foo', 'foo', 'i'). |
@IsMilitaryTime() | Checks if the string is a valid representation of military time in the format HH:MM. |
@IsTimeZone() | Checks if the string represents a valid IANA time-zone. |
@IsHash(algorithm: string) | Checks if the string is a hash. Supported: md4, md5, sha1, sha256, sha384, sha512, ripemd128, ripemd160, tiger128, tiger160, tiger192, crc32, crc32b. |
@IsMimeType() | Checks if the string matches a valid MIME type format. |
@IsSemVer() | Checks if the string is a Semantic Versioning Specification (SemVer). |
@IsISSN(options?: IsISSNOptions) | Checks if the string is an ISSN. |
@IsISRC() | Checks if the string is an ISRC. |
@IsRFC3339() | Checks if the string is a valid RFC 3339 date. |
@IsStrongPassword(options?: IsStrongPasswordOptions) | Checks if the string is a strong password. |