Check of mandatory data not work in web forms

Hi Guys,

I am creating a web form with only two fields, a field of type attachment and another field type text. I selected the mandatory option, however the web form can be sent with blank fields

These data should be mandatory in the web form but not necessarily to the DocType.


@ranher Yeah seems to be an issue. Can you raise an issue at GitHub

I found some problems with the file generator web_form,html, I have modified and is working well for me.

You can check this, I changed the line 55, 248 and 249

55 {{ field.reqd and “required” or “” }}
248 if(($input.prop(“required”) && val==="") || ($input.prop(“required”) && val===undefined && input_type===“file”)) {
249 frappe.msgprint(__($input.attr(“data-label”) + " is required"));