Skip to content
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

Ensure Validated<T> honors nullability of parameter like the default binding does #12

Open
DamianEdwards opened this issue Sep 27, 2021 · 0 comments

Comments

@DamianEdwards
Copy link
Owner

Currently, Validated<TValue> can return a null value even if the parameter was declared as non-nullable. RequestDelegateFactory (i.e. the default binding logic in the framework) honors the nullability declared on the parameter type and in the case it determines nullability is not allowed and a null value is found, auto-replies with a 400 Bad Request. Validator<TValue> can't auto-reply but it can set add an error to the errors collection and set a status code.

This might already be working as intended and best case is it just needs a test to verify.

@DamianEdwards DamianEdwards transferred this issue from DamianEdwards/MiniValidation Jan 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant