Following with my Form View: Volto Form View I have noticed that when you add a required boolean field like:
privacyPolicy: {
title: intl.formatMessage(messages.privacyPolicy),
type: 'boolean',
required: true, # Added this as testing
},
And set it on the required
fields of the Form I can still submit the Form as the FormValidation.jsx skips the boolean types. I am wondering what's the reason behind this? I am missing something?
So far I solved it registering the CheckboxWidget
on my addon:
config.widgets.widget.checkbox_widget = CheckboxWidget
And changing the field to:
privacyPolicy: {
title: intl.formatMessage(messages.privacyPolicy),
widget: 'checkbox_widget',
required: true,
},
So the field it's not of boolean type anymore