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
Currently, validation for forms is not documented and does not seem to be flexible for a regular text input. For example, <EmailInputGroup /> seems to be too specific and tied to an email input. Would it make more sense to simply apply validation to the form elements as props. In angular for example, you get a scoped form object that uses children form elements based on their name properties. For example a form with name="someForm" with an input with name="email" would be inherited and referenced as someForm.email for validation attributes (pristine, dirty, invalid, valid).
Would it make sense to pass the validation state of the FormField in via this.props. For example:
This would allow the FormField to specify a childContextType and pass the validity down to whatever child existed under the FormField. Then both the FormField and the child component (FormInput, Checkbox) would render themselves based on the validation passed in. When the FormInput, Checkbox changes it's validation, the onChange would trigger passing the current validity along as well. Upon validation in the developers callback, he could pass down the new validation.
The text was updated successfully, but these errors were encountered:
Currently, validation for forms is not documented and does not seem to be flexible for a regular text input. For example,
<EmailInputGroup />
seems to be too specific and tied to an email input. Would it make more sense to simply apply validation to the form elements as props. In angular for example, you get a scoped form object that uses children form elements based on their name properties. For example a form with name="someForm" with an input with name="email" would be inherited and referenced as someForm.email for validation attributes (pristine, dirty, invalid, valid).Would it make sense to pass the validation state of the FormField in via this.props. For example:
This would allow the FormField to specify a childContextType and pass the validity down to whatever child existed under the FormField. Then both the FormField and the child component (FormInput, Checkbox) would render themselves based on the validation passed in. When the FormInput, Checkbox changes it's validation, the onChange would trigger passing the current validity along as well. Upon validation in the developers callback, he could pass down the new validation.
The text was updated successfully, but these errors were encountered: