Option to validate all responses
See original GitHub issueI can’t find an option to validate all responses, it gets repetitive to keep doing.
const validationError = res.validateResponse(200, json);
if (validationError) {
return next(validationError);
}
res.json(json);
Issue Analytics
- State:
- Created 8 years ago
- Comments:35 (24 by maintainers)
Top Results From Across the Web
How to Add Response Validation to Google Forms - MakeUseOf
Response validation is a set of rules that restrict the type of responses that can be filled into a certain field based on...
Read more >How to add response validation to a question in Google Forms?
To add a response validation, select a question in Google Forms, click on ⋮ More icon and select show Response validation. The response...
Read more >How to Validate Responses in Google Forms - How-To Geek
To enable it, select one of those question types on the top right of the question box. Click the three dots on the...
Read more >How to Set Up Response Validation in Google Forms
If you want to use paragraph response validation in Google Forms, just add a paragraph element to your form. Then select the three...
Read more >Set rules for your form - Google Docs Editors Help
Open a form in Google Forms. · Add one of the following types of questions: Short answer; Paragraph; Checkboxes · Click More More...
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 FreeTop 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
Top GitHub Comments
I’m wondering if we can close this issue now, because I’m having a hard time thinking of an alternative that isn’t too prescriptive. Perhaps this could be documented in openapi-response-validator’s README? @maxwellb thoughts on submitting a PR to submit an example with your findings?
If you want to automatically validate responses with res.json() use this express middleware: