2
0
mirror of https://github.com/frappe/books.git synced 2025-02-02 03:58:26 +00:00

invalidate input if validate returns false

This commit is contained in:
Faris Ansari 2018-04-02 22:37:08 +05:30
parent eb97db9deb
commit 7eeb3ca137

View File

@ -169,6 +169,7 @@ class BaseControl {
async handleChange(event) {
let value = await this.parse(this.getInputValue());
value = await this.validate(value);
this.input.setCustomValidity(value === false ? 'error' : '');
await this.updateDocValue(value);
}