()
| 111 | } |
| 112 | |
| 113 | async validate() { |
| 114 | let valid = await this.validator(this.value); |
| 115 | if (typeof valid === `string`) { |
| 116 | this.errorMsg = valid; |
| 117 | valid = false; |
| 118 | } |
| 119 | this.error = !valid; |
| 120 | } |
| 121 | |
| 122 | async submit() { |
| 123 | this.value = this.value || this.initial; |