Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Automatically validate params based of the Schema data #1128
@danielbachhuber The implementation of the
We could change that and bulk them all or multiple - though that should be a PR on top of https://github.com/WP-API/WP-API/pull/989/files#diff-887d62e7b2ec4bf35ee08d99831b5b4bR681 I think.
I think it could be a good idea - the only downside is slight performance hit I suppose.
I think it makes sense to validate all at once. Consider submitting a form. If you did them one at a time, then the user would only get one error at a time and potentially hit 10+ error states before successfully submitting.
If it's too much of a lift, we can come back to it later. At the very least though, it would be nice if the response could support one or more error messages.