|
|
@ -88,7 +88,6 @@ frappe.ui.form.on('Vehicle', { |
|
|
|
frappe.throw(__("Just a <b>.</b> is not prescribed!")); |
|
|
|
frappe.validated = false; |
|
|
|
} |
|
|
|
//var regex = /^[A-Za-z0-9&-()@/,.<>_ ]*$/;
|
|
|
|
var regex = /[!@#$%^&*()_+\=\[\]{};'`~:"\\|.<>\/?]+/; |
|
|
|
if (frm.doc.vehicle) { |
|
|
|
if (regex.test(frm.doc.vehicle) === true) { |
|
|
@ -102,6 +101,12 @@ frappe.ui.form.on('Vehicle', { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
var regex = /[!@#$%^&*()_+-\=\[\]{};'`"\\|.<>\/?]+/; |
|
|
|
if (regex.test(frm.doc.display_order) === true) { |
|
|
|
frappe.throw(__("<b>Display Order:</b> negative values not allowed.")); |
|
|
|
frappe.validated = false; |
|
|
|
} |
|
|
|
|
|
|
|
if (frm.doc.display_order && frm.doc.vehicle && frm.doc.vehicle_segment && !frm.is_new()) { |
|
|
|
//*** check if there is same display_order
|
|
|
|
frappe.db.get_list('Vehicle', { |
|
|
|