summaryrefslogtreecommitdiff
path: root/src/api
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2017-03-02 17:14:46 +0900
committersyuilo <syuilotan@yahoo.co.jp>2017-03-02 17:14:46 +0900
commitb1195e5bfd9839f6ae3d8d375c948c8d0d5f7f20 (patch)
tree3dfbbb7f6e228ad6c53b35c68a3631e2c8c61262 /src/api
parentwip (diff)
downloadsharkey-b1195e5bfd9839f6ae3d8d375c948c8d0d5f7f20.tar.gz
sharkey-b1195e5bfd9839f6ae3d8d375c948c8d0d5f7f20.tar.bz2
sharkey-b1195e5bfd9839f6ae3d8d375c948c8d0d5f7f20.zip
Fix bug
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';