Skip to content

PATCH with ValidateModelState enabled and [Required] attribute #472

Closed
@milosloub

Description

@milosloub

If I provide ValidateModelState =true, then every PATCH failed on validation
on properties with [Required] attribute.
For example I have three properties with [Required], but sending patch to one of them only. Then
two of them failed on validation.

I found that AspNetCore uses JsonPatchDocument for this use case, but maybe I missed something.
Do you know how to deal with it?

  • JsonApiDotNetCore Version: 3.0.1-alpha4

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions