Eroorr after custom script

Hello I have added ,Date’’ custom script
from frappe import utils

but after selecting the correct date is giving me the following erorr:

SyntaxError: Unexpected identifier
at Class.setup (
at _f.Frm.setup (
at _f.Frm.refresh (
at Class.load (
at Object.callback (
at Object.callback [as success_callback] (
at 200 (
at Object. (
at i (

What needs to be done?


It’s solved:) Thanks!

frappe.ui.form.on(“Stock Request”, “validate”, function(frm) {
if (frm.doc.date_required < get_today()) {
msgprint(__(“Past dates are not allowed”));
validated = false;