fix: dont apply varchar length validation on singles (#19872)

closes https://github.com/frappe/frappe/issues/19833

[skip ci]
This commit is contained in:
Ankush Menat 2023-02-01 10:22:50 +05:30 committed by GitHub
parent 4ca23dd5fa
commit 9d97097c12
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -220,6 +220,10 @@ frappe.ui.form.ControlData = class ControlData extends frappe.ui.form.ControlInp
this.df.fieldtype
)
) {
if (this.frm?.meta?.issingle) {
// singles dont have any "real" length requirements
return;
}
this.$input.attr("maxlength", this.df.length || 140);
}