Skip to content

Commit e7e2e53

Browse files
JackJack Martin
Jack
and
Jack Martin
authored
feat: add IsFirebasePushId validator (#548)
* feat: add IsPushId * fix: rename isPushId to isFirebasePushId Co-authored-by: Jack Martin <jack.martin@addtoevent.co.uk>
1 parent b8aa922 commit e7e2e53

File tree

6 files changed

+210
-66
lines changed

6 files changed

+210
-66
lines changed

Diff for: README.md

+2
Original file line numberDiff line numberDiff line change
@@ -854,6 +854,7 @@ validator.isMultibyte(str); // Checks if the string contains one or more multiby
854854
validator.isSurrogatePair(str); // Checks if the string contains any surrogate pairs chars.
855855
validator.isURL(str, options); // Checks if the string is an url.
856856
validator.isUUID(str, version); // Checks if the string is a UUID (version 3, 4, 5 or all).
857+
validator.IsFirebasePushId(str); // Checks if the string is a Firebase Push Id
857858
validator.isUppercase(str); // Checks if the string is uppercase.
858859
validator.length(str, min, max); // Checks if the string's length falls in a range.
859860
validator.minLength(str, min); // Checks if the string's length is not less than given number.
@@ -951,6 +952,7 @@ validator.isInstance(value, target); // Checks value is an instance of the targe
951952
| `@IsSurrogatePair()` | Checks if the string contains any surrogate pairs chars. |
952953
| `@IsUrl(options?: IsURLOptions)` | Checks if the string is an url. |
953954
| `@IsUUID(version?: "3"\|"4"\|"5"\|"all")` | Checks if the string is a UUID (version 3, 4, 5 or all ). |
955+
| `@IsFirebasePushId()` | Checks if the string is a [Firebase Push id](https://firebase.googleblog.com/2015/02/the-2120-ways-to-ensure-unique_68.html) |
954956
| `@IsUppercase()` | Checks if the string is uppercase. |
955957
| `@Length(min: number, max?: number)` | Checks if the string's length falls in a range. |
956958
| `@MinLength(min: number)` | Checks if the string's length is not less than given number. |

0 commit comments

Comments
 (0)