Try ERPNext Try Frappe Cloud Buy Support Partners Foundation

Calling validation from the client when custom button is clicked

In my use case, I want to call the DocType validations when my custom button is clicked. The Save button provided by Frappe will be hidden for my use case. How do I invoke the DocType validations explicitly? I tried the frm.trigger(“validate”), but it executes only the Custom Script validations and not the mandatory field validations. How do I invoke all the client side validations?