We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
S6964 complains about under-posting when properties are not nullable and annotated with BindRequiredAttribute.
BindRequiredAttribute
Indicates that a property is required for model binding. When applied to a property, the model binding system requires a value for that property.
Use view model with property
[BindRequired] public int PasswordMinLength { get; init; }
No issue reported.
S6964 issue reported.
Use required keyword in addition. Needs further code changes.
required
The text was updated successfully, but these errors were encountered:
Hello @PaulBol,
Thank you for reporting this issue to us.
I confirm this is a false positive!
Sorry, something went wrong.
No branches or pull requests
Description
S6964 complains about under-posting when properties are not nullable and annotated with
BindRequiredAttribute
.Repro steps
Use view model with property
Expected behavior
No issue reported.
Actual behavior
S6964 issue reported.
Known workarounds
Use
required
keyword in addition. Needs further code changes.Related information
The text was updated successfully, but these errors were encountered: