Condition for validated == false

I need a condition to use when frappe validated is false.
Like:

if (frappe.validated == false) {
     //don't execute the function
}

Or a event like on_valitate but must be a validate, not save!

What is the use case?

Cause when the date of form is invalid, the frappe validated is false, but my sript runs… so I need pass for the frappe validate, and then run my custom script if validated == true

Help please

Can you share more code? Where did you put the if condition

It’s a normal condition, can you list me all of triggers and events? Has some event like after_validate?