You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+19
Original file line number
Diff line number
Diff line change
@@ -837,21 +837,34 @@ isBoolean(value);
837
837
| `@IsAlphanumeric()` | Checks if the string contains only letters and numbers.
838
838
| `@IsDecimal(options?: IsDecimalOptions)` | Checks if the string is a valid decimal value. Default IsDecimalOptions are `force_decimal=False`, `decimal_digits:'1,'`, `locale:'en-US',` |
839
839
| `@IsAscii()` | Checks if the string contains ASCII chars only. |
840
+
| `@IsBase32()` | Checks if a string is base32 encoded. |
840
841
| `@IsBase64()` | Checks if a string is base64 encoded. |
842
+
| `@IsIBAN()` | Checks if a string is a IBAN (International Bank Account Number). |
843
+
| `@IsBIC()` | Checks if a string is a BIC (Bank Identification Code) or SWIFT code. |
841
844
| `@IsByteLength(min:number, max?:number)` | Checks if the string's length (in bytes) falls in a range. |
842
845
| `@IsCreditCard()` | Checks if the string is a credit card. |
843
846
| `@IsCurrency(options?:IsCurrencyOptions)` | Checks if the string is a valid currency amount. |
847
+
| `@IsEthereumAddress()` | Checks if the string is an Ethereum address using basic regex. Does not validate address checksums. |
848
+
| `@IsBtcAddress()` | Checks if the string is a valid BTC address. |
849
+
| `@IsDataURI()` | Checks if the string is a data uri format. |
844
850
| `@IsEmail(options?:IsEmailOptions)` | Checks if the string is an email. |
845
851
| `@IsFQDN(options?:IsFQDNOptions)` | Checks if the string is a fully qualified domain name (e.g. domain.com). |
846
852
| `@IsFullWidth()` | Checks if the string contains any full-width chars. |
847
853
| `@IsHalfWidth()` | Checks if the string contains any half-width chars. |
848
854
| `@IsVariableWidth()` | Checks if the string contains a mixture of full and half-width chars. |
849
855
| `@IsHexColor()` | Checks if the string is a hexadecimal color. |
856
+
| `@IsHSLColor()` | Checks if the string is an HSL (hue, saturation, lightness, optional alpha) color based on [CSS Colors Level 4 specification](https://developer.mozilla.org/en-US/docs/Web/CSS/color_value). |
857
+
| `@IsRgbColor(options?:IsRgbOptions)` | Checks if the string is a rgb or rgba color. |
858
+
| `@IsIdentityCard(locale?:string)` | Checks if the string is a valid identity card code. |
859
+
| `@IsPassportNumber(countryCode?:string)` | Checks if the string is a valid passport number relative to a specific country code. |
860
+
| `@IsPostalCode(locale?:string)` | Checks if the string is a postal code. |
850
861
| `@IsHexadecimal()` | Checks if the string is a hexadecimal number. |
862
+
| `@IsOctal()` | Checks if the string is a octal number. |
851
863
| `@IsMACAddress(options?:IsMACAddressOptions)` | Checks if the string is a MAC Address. |
852
864
| `@IsIP(version?:"4"\|"6")` | Checks if the string is an IP (version 4 or 6). |
853
865
| `@IsPort()` | Check if the string is a valid port number. |
854
866
| `@IsISBN(version?:"10"\|"13")` | Checks if the string is an ISBN (version 10 or 13). |
867
+
| `@IsEAN()` | Checks if the string is an if the string is an EAN (European Article Number). |
855
868
| `@IsISIN()` | Checks if the string is an ISIN (stock/security identifier). |
856
869
| `@IsISO8601(options?:IsISO8601Options)` | Checks if the string is a valid ISO 8601 date. Use the option strict = true for additional checks for a valid date, e.g. invalidates dates like 2019-02-29. |
857
870
| `@IsJSON()` | Checks if the string is valid JSON. |
@@ -865,12 +878,14 @@ isBoolean(value);
865
878
| `@IsMobilePhone(locale:string)` | Checks if the string is a mobile phone number. |
866
879
| `@IsISO31661Alpha2()` | Checks if the string is a valid [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) officially assigned country code. |
867
880
| `@IsISO31661Alpha3()` | Checks if the string is a valid [ISO 3166-1 alpha-3](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) officially assigned country code. |
881
+
| `@IsLocale()` | Checks if the string is a locale. |
868
882
| `@IsPhoneNumber(region:string)` | Checks if the string is a valid phone number. "region" accepts 2 characters uppercase country code (e.g. DE, US, CH).If users must enter the intl. prefix (e.g. +41), then you may pass "ZZ" or null as region. See [google-libphonenumber, metadata.js:countryCodeToRegionCodeMap on github](https://github.com/ruimarinho/google-libphonenumber/blob/1e46138878cff479aafe2ce62175c6c49cb58720/src/metadata.js#L33) |
869
883
| `@IsMongoId()` | Checks if the string is a valid hex-encoded representation of a MongoDB ObjectId. |
870
884
| `@IsMultibyte()` | Checks if the string contains one or more multibyte chars. |
871
885
| `@IsNumberString(options?:IsNumericOptions)` | Checks if the string is numeric. |
872
886
| `@IsSurrogatePair()` | Checks if the string contains any surrogate pairs chars. |
873
887
| `@IsUrl(options?:IsURLOptions)` | Checks if the string is an url. |
888
+
| `@IsMagnetURI()` | Checks if the string is a [magnet uri format](https://en.wikipedia.org/wiki/Magnet_URI_scheme). |
874
889
| `@IsUUID(version?:"3"\|"4"\|"5"\|"all")` | Checks if the string is a UUID (version 3, 4, 5 or all ). |
875
890
| `@IsFirebasePushId()` | Checks if the string is a [Firebase Push id](https://firebase.googleblog.com/2015/02/the-2120-ways-to-ensure-unique_68.html) |
876
891
| `@IsUppercase()` | Checks if the string is uppercase. |
@@ -880,7 +895,11 @@ isBoolean(value);
880
895
| `@Matches(pattern:RegExp, modifiers?:string)` | Checks if string matches the pattern. Either matches('foo', /foo/i) or matches('foo', 'foo', 'i').
881
896
| `@IsMilitaryTime()` | Checks if the string is a valid representation of military time in the format HH:MM. |
882
897
| `@IsHash(algorithm:string)` | Checks if the string is a hash of type algorithm. <br/><br/>Algorithm is one of `['md4', 'md5', 'sha1', 'sha256', 'sha384', 'sha512', 'ripemd128', 'ripemd160', 'tiger128', 'tiger160', 'tiger192', 'crc32', 'crc32b']` |
898
+
| `@IsMimeType()` | Checks if the string matches to a valid [MIME type](https://en.wikipedia.org/wiki/Media_type) format |
899
+
| `@IsSemVer()` | Checks if the string is a Semantic Versioning Specification (SemVer). |
883
900
| `@IsISSN(options?:IsISSNOptions)` | Checks if the string is a ISSN. |
901
+
| `@IsISRC()` | Checks if the string is a [ISRC](https://en.wikipedia.org/wiki/International_Standard_Recording_Code). |
902
+
| `@IsRFC3339()` | Checks f the string is a valid [RFC 3339](https://tools.ietf.org/html/rfc3339) date. |
884
903
| **Array validation decorators** |
885
904
| `@ArrayContains(values:any[])` | Checks if array contains all values from the given array of values. |
886
905
| `@ArrayNotContains(values:any[])` | Checks if array does not contain any of the given values. |
0 commit comments