-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
implicitly required form fields visual #487
Comments
In a video call we did not find agreement on the concept of The solution we agreed on is to separate I'm unsure if the new prop (something like |
As I see it, I'd go with Should both |
Users may find themselves in a situation where the input is not required (i.e. making the input checked), but they also don't want to render the field as optional because not choosing an option can be perfectly valid. For this case, there is the `renderAsRequired` prop. This affects `CheckboxField`, `Radio`, `SelectField`, and `Toggle`.
Users may find themselves in a situation where the input is not required (i.e. making the input checked), but they also don't want to render the field as optional because not choosing an option can be perfectly valid. For this case, there is the `renderAsRequired` prop. This affects `CheckboxField`, `Radio`, `SelectField`, and `Toggle`. Closes #487
Users may find themselves in a situation where the input is not required (i.e. making the input checked), but they also don't want to render the field as optional because not choosing an option can be perfectly valid. For this case, there is the `renderAsRequired` prop. This affects `CheckboxField`, `Radio`, `SelectField`, and `Toggle`. Closes #487
For some form fields:
Toggle
,CheckboxField
)SelectField
,Radio
)The semantics of
required
are different then for fields such asTextField
. WhenTextField
is left empty, it means the user did not specify value. When one of the above mentioned special fields is left untouched, it still carries a meaning (e.g.false
).The above mentioned special fields are therefore always required as it is impossible not to fill them. Accordingly, they should always be styled as required fields even when they do not have the
required
attribute.The
required
attribute on boolean fields means "must be set to true" which is different from its meaning when used with for example aTextField
. When therequired
attribute is used in this sense, it must be communicated by other means, (e.g. by adding (required) to the label or such).Note that HTML
<select multiple>
can be left with no selected value, but RUI does not implement this.The text was updated successfully, but these errors were encountered: