Browse Source

Change label regex

master
venkataakhil 1 year ago
parent
commit
1f6ff7f4f1
  1. 4
      smart_service/masters/doctype/app_labels/app_labels.js

4
smart_service/masters/doctype/app_labels/app_labels.js

@ -36,7 +36,7 @@ frappe.ui.form.on('App Labels', {
frappe.throw(__("Just a <b>.</b> is not prescribed!"));
frappe.validated = false;
}
var regex = /[!@#$%^&*()+\=\[\]{};`~':"\\|.<>\/?]+/;
var regex = /[!@#$%^&*()+\=\[\]{};`~':"\\|.<>\/]+/;
if (frm.doc.english_label) {
if (regex.test(frm.doc.english_label) === true) {
frappe.throw(__("<b>English Label :</b> Only letters, numbers and <b> - , </b> are allowed."));
@ -90,7 +90,7 @@ frappe.ui.form.on('App Labels', {
frappe.throw(__("Just a <b>.</b> is not prescribed!"));
frappe.validated = false;
}
var regex = /[!@#$%^&*()+\=\[\]{};`~':"\\|.<>\/?]+/;
var regex = /[!@#$%^&*()+\=\[\]{};`~':"\\|.<>\/]+/;
if (frm.doc.label) {
if (regex.test(frm.doc.label) === true) {
frappe.throw(__("<b>Translated Label :</b> Only letters, numbers and <b> -,</b> are allowed."));

Loading…
Cancel
Save