dotnet / dotnet/dotnet-api-docs

Incorrect CustomValidationAttribute remarks

Open
#3,126 3 comments 0 reactions 0 assignees View on GitHub
area-System.ComponentModel.DataAnnotations cross-platform Pri3 waiting-on-feedback
Dominant language
C#
Stars
949
Forks
1.7k
Avg merge
3d 27m
Merged PRs (30d)
49

Description

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](https://github.com/dotnet/docs/blob/master/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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.