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

Incorrect CustomValidationAttribute remarks #3126

Open
hrobertson opened this issue Sep 5, 2019 · 2 comments · May be fixed by #9775
Open

Incorrect CustomValidationAttribute remarks #3126

hrobertson opened this issue Sep 5, 2019 · 2 comments · May be fixed by #9775
Labels
area-System.ComponentModel.DataAnnotations cross-platform Indicates issues or PRs that relate to content applicable to both Framework and Core. Pri3 Indicates issues/PRs that are low priority waiting-on-feedback Indicates PRs that are waiting for feedback from SMEs before they can be merged

Comments

@hrobertson
Copy link

Content: https://docs.microsoft.com/en-us/dotnet/api/system.componentmodel.dataannotations.customvalidationattribute.method?view=netcore-2.2
Content source: xml/System.ComponentModel.DataAnnotations/CustomValidationAttribute.xml

The remarks for the Method property of CustomValidationAttribute incorrectly state that the specified method must return a Boolean and takes a ValidationResult out param. In .Net Core 2.2 at least, it must return a ValidationResult.

Maybe the signature is different in different languages?

Additionally, it would be preferable to have the valid signatures listed as code snippets rather than described in text.

@dotnet-bot dotnet-bot added the untriaged New issue has not been triaged by the area owner label Sep 5, 2019
@mairaw
Copy link
Contributor

mairaw commented Sep 5, 2019

Thank you for your feedback @hrobertson.

@lajones, @divega, @ajcvickers can you help with this issue? Are there differences in behavior between .NET Framework and .NET Core for this API? Thanks.

@mairaw mairaw added cross-platform Indicates issues or PRs that relate to content applicable to both Framework and Core. waiting-on-feedback Indicates PRs that are waiting for feedback from SMEs before they can be merged and removed untriaged New issue has not been triaged by the area owner labels Sep 5, 2019
@hrobertson
Copy link
Author

Doesn't look like it: https://referencesource.microsoft.com/#System.ComponentModel.DataAnnotations/DataAnnotations/CustomValidationAttribute.cs,db5138ec9e85f648

@PRMerger13 PRMerger13 added the Pri3 Indicates issues/PRs that are low priority label Nov 11, 2020
zii-dmg added a commit to zii-dmg/dotnet-api-docs that referenced this issue Mar 29, 2024
Fixed return type - no boolean, only ValidationResult allowed. Fixes dotnet#3126
@zii-dmg zii-dmg linked a pull request Mar 29, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-System.ComponentModel.DataAnnotations cross-platform Indicates issues or PRs that relate to content applicable to both Framework and Core. Pri3 Indicates issues/PRs that are low priority waiting-on-feedback Indicates PRs that are waiting for feedback from SMEs before they can be merged
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants