mistica-web icon indicating copy to clipboard operation
mistica-web copied to clipboard

Checkbox should be able to support isMandatory

Open dominik-petschenka-syzygy opened this issue 1 year ago • 3 comments

In some forms we need checkboxes that have to be checked for the user to proceed.

Right now we have to implement our own state handling and validation for these checkboxes.

It would be great if the Checkbox component would support isMandatory out of the box. It should prevent the form from being submitted and render a colored indication or similar like the Select and TextField.

Thanks for your suggestion. We will discuss this feature with the design team

pladaria avatar Jul 02 '24 09:07 pladaria

Hello @dominik-petschenka-syzygy. Thank you for your suggestion! :)

We need to review this with the design team. In the future, you may want to open a discussion in the mistica-design repo instead: https://github.com/Telefonica/mistica-design/discussions

marcoskolodny avatar Jul 02 '24 09:07 marcoskolodny

Our current design specs for this use case say:

When checkboxes are used in forms for legal conditions or other types of information that prevent the process from continuing without acceptance, we will display an alert/dialog to the user explaining that they need to accept the respective field

Example implementation

Design Team will review this anyway

pladaria avatar Jul 02 '24 09:07 pladaria