Synchronous validation
See original GitHub issueBug, Feature, or Question?
Question
Current Behavior
Since Yup validations are async, components render twice as far as I’ve read in previous issues, and I have 150 input fields on one page and it’s extremely noticeable when user starts to type, it basically becomes unusable. So, since there is boolean flag in validateYupSchema
method for synchronous version is there a way to set it as prop on Formik
component?
Desired Behavior
To run Yup validations synchronously.
- Formik Version: 1.0.0-alpha.2
- React Version: 16.2.0
- OS: MacOS
- Node Version: 8.9.1
- Package Manager and Version: npm v5.6.0
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Synchronous Validation Example - Redux Form
IMPORTANT: Synchronous validation happens on every change to your form data, so, if your field value is invalid, your field.error value will always...
Read more >Redux Form - Synchronous Validation - CodeSandbox
A synchronous validation example using Redux Form. 10. 34.9k. 2.4k. erikraserikras. Environmentcreate-react-app. Files. SyncValidationForm.js. index.js.
Read more >Synchronization Validation - Informatica Documentation
You can validate run-time synchronization of dynamic sources and targets. If you configure a dynamic mapping that uses data sources that are set...
Read more >Creating Angular Synchronous and Asynchronous Validators ...
Synchronous and asynchronous Validators are very similar - the main difference is that a sync Validator returns an error object instance ...
Read more >Synchronous Validation for multiple messages.
Synchronous Validation for multiple messages. Description. During streaming Ingestion via HTTP API, synchronous Validation not working ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
By the way, this is how I did synchronous validation using
yup
andvalidate
function:This is even more relevant now because async validation now triggers
act
errors in tests when using React Hooks.