Add support for joi schema type

This commit is contained in:
Matthew Bull
2019-01-31 16:11:26 +00:00
parent fda6ae2b4f
commit 2be1aea0d0
2 changed files with 7 additions and 0 deletions
+5
View File
@@ -792,6 +792,11 @@ export interface ObjectSchema extends AnySchema {
*/
length(limit: number): this;
/**
* Requires the object to be a Joi schema instance.
*/
schema(): this;
/**
* Specify validation rules for unknown keys matching a pattern.
*
+2
View File
@@ -706,6 +706,8 @@ objSchema = objSchema.nand(str, str);
objSchema = objSchema.nand(str, str, str);
objSchema = objSchema.nand(strArr);
objSchema = objSchema.schema();
objSchema = objSchema.or(str);
objSchema = objSchema.or(str, str);
objSchema = objSchema.or(str, str, str);