dotnet / dotnet/dotnet-api-docs
In CustomValidationAttribute description of validatorType is useless
- Dominant language
- C#
- Stars
- 949
- Forks
- 1.7k
- Avg merge
- 3d 27m
- Merged PRs (30d)
- 49
Description
### Type of issue
Lack of information
### Description
Hi,
Trying to implement a custom validation attribute deriving from [CustomValidationAttribute](https://learn.microsoft.com/en-us/dotnet/api/system.componentmodel.dataannotations.customvalidationattribute), the [documentation on the constructor](https://learn.microsoft.com/en-us/dotnet/api/system.componentmodel.dataannotations.customvalidationattribute.-ctor) does not say anything useful about the validatorType.
Does it have to implement a certain interface ? be of a certain type ?
I ended up deriving ValidationAttribute which more suited my need.
Nevertheless, the documentation could be improved.
Can somebody add some more information ?
Scal
### Page URL
https://learn.microsoft.com/en-us/dotnet/api/system.componentmodel.dataannotations.customvalidationattribute.-ctor?view=net-9.0
### Content source URL
https://github.com/dotnet/dotnet-api-docs/blob/main/xml/System.ComponentModel.DataAnnotations/CustomValidationAttribute.xml
### Document Version Independent Id
b2df589f-3424-b320-aad2-5f5381b18fcb
### Article author
@dotnet-bot
Contributor guide
Assessment
This issue has not been assessed yet.