Browse Source

Allow special character :

master
venkataakhil 2 years ago
parent
commit
7151afd8af
  1. 4
      smart_service/transactions/doctype/procedure/procedure.js

4
smart_service/transactions/doctype/procedure/procedure.js

@ -35,14 +35,14 @@ frappe.ui.form.on('Procedure', {
},
validate: function (frm) {
var regex = /[@#$%^*+\\[\]{}`~:\\|\?]+/;
var regex = /[@#$%^*+\\[\]{}`~\\|\?]+/;
if (frm.doc.procedure_details) {
for (var i = 0; i < frm.doc.procedure_details.length; i++) {
if (regex.test(frm.doc.procedure_details[i].content) === true) {
if (frm.doc.procedure_details[i].content_type != "Link") {
frm.doc.procedure_details[i].content_type = ''
frm.refresh_fields();
frappe.msgprint(__("<b>Content:</b> Only letters, numbers and <b> - ,'<>_()!=/;</b> are allowed."));
frappe.msgprint(__("<b>Content:</b> Only letters, numbers and <b> - ,'<>_()!=/±;</b> are allowed."));
}
}
}

Loading…
Cancel
Save