summaryrefslogtreecommitdiff
path: root/src/api
diff options
context:
space:
mode:
Diffstat (limited to 'src/api')
-rw-r--r--src/api/validator2.ts5
1 files changed, 5 insertions, 0 deletions
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';