Skip to content

JADNC: Add required on post validator. #765

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

Conversation

sasman0001
Copy link
Contributor

@sasman0001 sasman0001 commented May 19, 2020

Fixes #472

This feature is a custom validator which causes a resource property to be RequiredOnPost, and also validates that the resource property is not updated with a null value on Patch.

@sasman0001 sasman0001 marked this pull request as ready for review May 26, 2020 18:37
Copy link
Contributor

@bart-degreed bart-degreed left a comment

Choose a reason for hiding this comment

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

In addition to my remarks, please add some documentation to docs\usage\resources\attributes.md.

@bart-degreed
Copy link
Contributor

Does this PR solve #472 (comment)?

@sasman0001 sasman0001 marked this pull request as draft June 4, 2020 19:53
@sasman0001
Copy link
Contributor Author

No, this does not resolve #472 (comment). I have converted back to draft because I want to give another approach a try. I did make the requested changes on this branch though.

-formatting
-add validation error to model state
-allow empty strings
-documentation
@sasman0001 sasman0001 closed this Jun 11, 2020
@sasman0001
Copy link
Contributor Author

Decided to go another direction, found here: #781

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.

PATCH with ValidateModelState enabled and [Required] attribute
2 participants