I have a field called vehicle no where user should enter the license plate no of the vehicle, so no hypens and slashes are allowed what should i do
Hi @ESP_Luffy,
Please apply the client script for that.
frappe.ui.form.on('Your DocType', {
validate: function(frm) {
var vehicle_no = frm.doc.vehicle_no;
if (vehicle_no && (vehicle_no.includes('-') || vehicle_no.includes('/'))) {
frappe.msgprint(__("Vehicle number cannot contain hyphens or slashes."));
frappe.validated = false;
}
}
});
Thank You!