-
Notifications
You must be signed in to change notification settings - Fork 30
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
docs(form): add migration guide #243
Conversation
Codecov Report
@@ Coverage Diff @@
## master #243 +/- ##
=======================================
Coverage 91.55% 91.55%
=======================================
Files 83 83
Lines 1728 1728
Branches 433 433
=======================================
Hits 1582 1582
Misses 117 117
Partials 29 29 Continue to review full report at Codecov.
|
initialValues={{ myInput: '' }} | ||
validationSchema={yup.object().shape({ myInput: yup.string().isRequired(true, 'This field is required.') })} | ||
> | ||
<Input name="myInput" type="text" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be
<Input
name="myInput"
type="text"
required
/>
(making it kinda the same as the old way) for a11y? I'm not sure if the validationSchema is automatically added the HTML5 equivalent or not, but if not, we should show it with a11y as a11y shouldn't be an afterthought and the examples should show best practices.
It also helps keep the examples as equivalent as far as the output to the browser/user.
Similar for the ones before which involve pattern and required.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the idea. I created #245
closes #238