mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-05 07:17:04 +00:00
Merge pull request #33453 from fgb4101/master
[yup] Add missing 'string.length' method.
This commit is contained in:
Vendored
+1
@@ -106,6 +106,7 @@ export interface StringSchemaConstructor {
|
||||
}
|
||||
|
||||
export interface StringSchema extends Schema<string> {
|
||||
length(limit: number | Ref, message?: TestOptionsMessage): StringSchema;
|
||||
min(limit: number | Ref, message?: TestOptionsMessage): StringSchema;
|
||||
max(limit: number | Ref, message?: TestOptionsMessage): StringSchema;
|
||||
matches(
|
||||
|
||||
@@ -292,6 +292,8 @@ strSchema.isValid("hello"); // => true
|
||||
strSchema.required();
|
||||
strSchema.required("req");
|
||||
strSchema.required(() => "req");
|
||||
strSchema.length(5, "message");
|
||||
strSchema.length(5, () => "message");
|
||||
strSchema.min(5, "message");
|
||||
strSchema.min(5, () => "message");
|
||||
strSchema.max(5, "message");
|
||||
|
||||
Reference in New Issue
Block a user