Skip to content

explain ModelState validation option ValidateModelState #487

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

Merged
merged 2 commits into from
Apr 5, 2019

Conversation

CoolGoose
Copy link
Contributor

This should make it clearer for people on how to have nice validation when creating / updating requests.

This should make it clearer for people on how to have nice validation when creating / updating requests.

## Enable ModelState Validation

If you would like to use ModelState validation into your controllers when creating / updating resources you set `ValidateModelState = true`. The default behavior is to try creating the database entries.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! This statement is a bit unclear to me

The default behavior is to try creating the database entries.

I would probably change this to something along the lines of:

By default, no model validation is performed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will update, thank you for the comment.

@jaredcnance jaredcnance merged commit 8f685a6 into json-api-dotnet:master Apr 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants