You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Do you think it would be ok to have it so that the input component adds an html attribute (required) to the input that it renders based on if the 'required' rule is in the list of rules for that component instance?
This would be so that if in my project I want different styling for a required input ( ie. an asterix next to the label for that input) I don't have to add a className for required in addition to adding the rule in the form config. The css wouldn't be part of the library but the library would give you the required attribute automatically.
Let me know if you agree with this. I could do a PR.
Could do something similar for other components eg, select ( which is passed required as a prop but doesn't pass it to the html elements it renders as far as I can see)
The text was updated successfully, but these errors were encountered:
hey,
Do you think it would be ok to have it so that the input component adds an html attribute (required) to the input that it renders based on if the 'required' rule is in the list of rules for that component instance?
This would be so that if in my project I want different styling for a required input ( ie. an asterix next to the label for that input) I don't have to add a className for required in addition to adding the rule in the form config. The css wouldn't be part of the library but the library would give you the
required
attribute automatically.Let me know if you agree with this. I could do a PR.
Could do something similar for other components eg, select ( which is passed required as a prop but doesn't pass it to the html elements it renders as far as I can see)
The text was updated successfully, but these errors were encountered: