Execute code after form validation

Hello.
I’m trying to execute some JS code after all validations in DocType form are checked, even those related to missing required values: what I’m trying to do is change a read-only field value after all validations are met.

I’ve tried using the before_save() and validate() events, but those events are running before validation, so if there are problems with the form values, my code runs anyway.

I would appreciate any advice on this.

Thanks!