mirror of
https://github.com/frappe/books.git
synced 2024-11-10 07:40:55 +00:00
fix: Better error message for Select validation
This commit is contained in:
parent
827cad114a
commit
6497d05627
@ -267,7 +267,7 @@ module.exports = class BaseMeta extends BaseDocument {
|
||||
}
|
||||
if (!validValues.includes(value)) {
|
||||
throw new frappe.errors.ValueError(
|
||||
`${value} must be one of ${options.join(', ')}`
|
||||
`Invalid value "${value}" for "${field.label}". Must be one of ${options.join(', ')}`
|
||||
);
|
||||
}
|
||||
return value;
|
||||
|
Loading…
Reference in New Issue
Block a user