mirror of
https://github.com/frappe/books.git
synced 2024-12-25 12:10:06 +00:00
fix: validate field only if value is set
This commit is contained in:
parent
53b0eea4f2
commit
ce5ecd1c18
@ -244,7 +244,7 @@ module.exports = class BaseDocument extends Observable {
|
||||
if (field.fieldtype == 'Select') {
|
||||
this.meta.validateSelect(field, value);
|
||||
}
|
||||
if (field.validate) {
|
||||
if (field.validate && value != null) {
|
||||
let validator = null;
|
||||
if (typeof field.validate === 'object') {
|
||||
validator = this.getValidateFunction(field.validate);
|
||||
|
Loading…
Reference in New Issue
Block a user