Make some field mandatory on a doctype?

How do I make a field mandatory on a doctype? I want the update stock ticked on every invoice, and so I want to make it mandatory. I’ve ticked the mandatory checkbox using the customize form but sales invoices still submit just fine even if the update stock checkbox isn’t ticked.

Hello,

For “Update Stock” field, set Default Value as 1 in the customize form.