Skip to content

Commit 8fcb525

Browse files
authored
Fixing typo (#4943)
The exception is thrown if `IsValid` returns false, not `Validate`.
1 parent 4c3160c commit 8fcb525

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

xml/System.ComponentModel.DataAnnotations/ValidationAttribute.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -611,7 +611,7 @@ This constructor chooses a very generic validation error message. Developers sub
611611
<format type="text/markdown"><![CDATA[
612612
613613
## Remarks
614-
This method calls the <xref:System.ComponentModel.DataAnnotations.ValidationAttribute.IsValid%2A> method to determine whether the object that is specified by the `value` parameter is valid. If the <xref:System.ComponentModel.DataAnnotations.ValidationAttribute.Validate%2A> method returns `false`, this method calls the <xref:System.ComponentModel.DataAnnotations.ValidationAttribute.FormatErrorMessage%2A> method to get a localized message that states the problem. It then throws a <xref:System.ComponentModel.DataAnnotations.ValidationException> exception.
614+
This method calls the <xref:System.ComponentModel.DataAnnotations.ValidationAttribute.IsValid%2A> method to determine whether the object that is specified by the `value` parameter is valid. If the <xref:System.ComponentModel.DataAnnotations.ValidationAttribute.IsValid%2A> method returns `false`, this method calls the <xref:System.ComponentModel.DataAnnotations.ValidationAttribute.FormatErrorMessage%2A> method to get a localized message that states the problem. It then throws a <xref:System.ComponentModel.DataAnnotations.ValidationException> exception.
615615
616616
]]></format>
617617
</remarks>

0 commit comments

Comments
 (0)