From 5c9d3f15aad4c33552cb9cd2add4bde252d1e7ad Mon Sep 17 00:00:00 2001 From: Vladyslav Tserman Date: Wed, 6 Dec 2017 15:58:35 -0800 Subject: [PATCH] Add missing property `message` and optional `params` into the ValidationError interface --- types/yup/index.d.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/types/yup/index.d.ts b/types/yup/index.d.ts index 403c1cac37..dfc4e47192 100644 --- a/types/yup/index.d.ts +++ b/types/yup/index.d.ts @@ -206,6 +206,7 @@ export interface SchemaDescription { export interface ValidationError { name: string; + message: string; value: any; /** * A string, indicating where there error was thrown. path is empty at the root level. @@ -220,7 +221,8 @@ export interface ValidationError { /** * In the case of aggregate errors, inner is an array of ValidationErrors throw earlier in the validation chain. */ - inner?: ValidationError[]; + inner: ValidationError[]; + params?: object; } export interface Ref {