Closed r-bartolomei closed 1 year ago
Thanks for reaching out. I will look into this and get back to you if I need more info (or have a solution).
Hey @r-bartolomei, I just put up a PR that would solve this issue over at #2423. Would love to get your feedback on whether the current styling (checkbox text turned to red) is expected for you if there's an alternative.
Hey @ewanharris. If the red border is not possible then the checkbox text on default colour I think might look better because it would align with the rest of mandatory fields (if any) as they would not have the text content on red.
Sorry for the delay @r-bartolomei, we've chatted about this and after a little investigation I think we might do the following:
invalidHint
is provided then we'll only make that text redinvalidHint
is not provided, then we'll make the placeholder
content red as without that there is no other way to flag the required fieldHey @r-bartolomei, this change shipped today in version 12.2.0
, thanks for the request!
@ewanharris Thank you for fixing it!
Checklist
Description
If you use
additionalSignUpFields
option with atype: 'checkbox'
that has avalidator
function (https://auth0.com/docs/libraries/lock/lock-configuration#checkbox-field), thesrc/ui/input/checkbox_input.jsx
is not wrapped within anInputWrap
component but within a simple div and as a result, theinvalidHint
will never be displayed when you press on the Sign Up button.Reproduction
with the below code:
because of
valid: value === 'true',
the field becomes mandatory (the user needs to check it) before being able to finish the Sign Up. But because of the missingInputWrap
within theCheckboxInput
(src/ui/input/checkbox_input.jsx
), no error message will be shown to the user if the checkbox is not checked and the user will not know why he can't go through with the sign up process.As a comparison,
src/ui/input/text_input.jsx
andsrc/ui/input/select_input.jsx
have the elements wrapped within theInputWrap
and those components are displaying theinvalidHint
correctly.Additional context
No response
Lock version
"auth0-lock": "12.0.2"
Which browsers have you tested in?
Chrome