Try ERPNext Buy Support Partners Foundation

Checkbox mandatory on webform doesn't apply

I made a webform from a custom doctype.
The problem is the checkbox that has to be checked when save the webform doesn’t apply. The form can be saved regardless of the checkbox checked or not.
I have make the check field mandatory in doctype and in webform.
If this can’t be done built-in, how do I enable this by code?
Thank you.