somehowchris / rocket-validation

A guard to validate data received by rocket via validator
16 stars 4 forks source link

Rocket 0.5 support and 422 error for validation-failed jsons #31

Closed huangjj27 closed 7 months ago

huangjj27 commented 8 months ago

Validated<Json<D>> will first return deserialized error when the input data doesn't match the data structure, which means some syntax error happened, so all the remained errors throw out by Validate should be sematic errors

somehowchris commented 7 months ago

Hi @huangjj27 Thanks for the PRs, usually I'd ask to make this 2 PR as I currently don't see the connection between the change of the rocket lib version and the response code message. I will remove the old versions of rust in the tests and everything should be good to go

somehowchris commented 7 months ago

FYI, it's not really versioning conform as this might be a breaking change, but will release this as a feat version

somehowchris commented 7 months ago

oops :) didn't mean to close it 😅