Check filed value on submit

How to check filed value when click submit and if the value not correct prevent user from submit the document

You can do this by custom script on “before_submit” event, something like below:

frappe.ui.form.on("Material Request", "before_submit", function(frm) {
    $.each(frm.doc.items || [], function(i, d) {
		if (d.billing_status != "Fully Billed") {
			msgprint("Sales Order Billing Status should be Fully Billed for generating Material Request");
			validated = false;
        }
    });
});

Dear @Mukesh_Variyani
Thanks for your response

it try this put only i got the massage and no check on if condition

frappe.ui.form.on(“Quotation”, “before_submit”, function(frm) {
$.each(frm.doc.items || , function(i, d) {
if (d.stage = 70) {
msgprint(“Sales Order Billing Status should be Fully Billed for generating Material Request”);
validated = false;
}
});
});

stage is one of quotation item table fields

try

d.stage == 70