fix(HR Settings): Unable to save HR Settings (#17608)
This commit is contained in:
parent
d07a3e1de2
commit
c3779851e4
@ -13,9 +13,11 @@ frappe.ui.form.on('HR Settings', {
|
|||||||
|
|
||||||
validate: function(frm) {
|
validate: function(frm) {
|
||||||
let policy = frm.doc.password_policy;
|
let policy = frm.doc.password_policy;
|
||||||
if (policy.includes(' ') || policy.includes('--')) {
|
if (policy) {
|
||||||
frappe.msgprint("Password policy cannot contain spaces or simultaneous hyphens. The format will be restructured automatically");
|
if (policy.includes(' ') || policy.includes('--')) {
|
||||||
|
frappe.msgprint("Password policy cannot contain spaces or simultaneous hyphens. The format will be restructured automatically");
|
||||||
|
}
|
||||||
|
frm.set_value('password_policy', policy.split(new RegExp(" |-", 'g')).filter((token) => token).join('-'));
|
||||||
}
|
}
|
||||||
frm.set_value('password_policy', policy.split(new RegExp(" |-", 'g')).filter((token) => token).join('-'));
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user