From b1195e5bfd9839f6ae3d8d375c948c8d0d5f7f20 Mon Sep 17 00:00:00 2001 From: syuilo Date: Thu, 2 Mar 2017 17:14:46 +0900 Subject: [PATCH] Fix bug --- src/api/validator2.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/api/validator2.ts b/src/api/validator2.ts index 057875f80b..a1c5ba164b 100644 --- a/src/api/validator2.ts +++ b/src/api/validator2.ts @@ -15,6 +15,11 @@ class ValidatorCore implements Validator { value: any; error: string; + constructor() { + this.value = null; + this.error = null; + } + required() { if (this.error === null && this.value === null) { this.error = 'required';