System.ComponentModel.Annotations 4.0.10.0 4.1.0.0 4.2.0.0 4.2.1.0 4.3.0.0 4.3.1.0 5.0.0.0 6.0.0.0 7.0.0.0 8.0.0.0 9.0.0.0 10.0.0.0 System.ComponentModel.DataAnnotations 2.0.5.0 3.5.0.0 4.0.0.0 System.Attribute [System.Runtime.CompilerServices.Nullable(0)] [<System.Runtime.CompilerServices.Nullable(0)>] Serves as the base class for all validation attributes. How to: Customize Data Field Validation in the Data Model Using Custom Attributes System.ComponentModel.Annotations 4.1.0.0 4.2.0.0 Initializes a new instance of the class. Constructor System.ComponentModel.Annotations 4.0.10.0 4.1.0.0 4.2.0.0 4.2.1.0 4.3.0.0 4.3.1.0 5.0.0.0 6.0.0.0 7.0.0.0 8.0.0.0 9.0.0.0 10.0.0.0 System.ComponentModel.DataAnnotations 2.0.5.0 3.5.0.0 4.0.0.0 Initializes a new instance of the class. Constructor System.ComponentModel.Annotations 4.0.10.0 4.1.0.0 4.2.0.0 4.2.1.0 4.3.0.0 4.3.1.0 5.0.0.0 6.0.0.0 7.0.0.0 8.0.0.0 9.0.0.0 10.0.0.0 System.ComponentModel.DataAnnotations 2.0.5.0 3.5.0.0 4.0.0.0 The function that enables access to validation resources. Initializes a new instance of the class by using the function that enables access to validation resources. property to retrieve an error message. ]]> is . Constructor System.ComponentModel.Annotations 4.0.10.0 4.1.0.0 4.2.0.0 4.2.1.0 4.3.0.0 4.3.1.0 5.0.0.0 6.0.0.0 7.0.0.0 8.0.0.0 9.0.0.0 10.0.0.0 System.ComponentModel.DataAnnotations 2.0.5.0 3.5.0.0 4.0.0.0 The error message to associate with a validation control. Initializes a new instance of the class by using the error message to associate with a validation control. To be added. Property System.ComponentModel.Annotations 4.0.10.0 4.1.0.0 4.2.0.0 4.2.1.0 4.3.0.0 4.3.1.0 5.0.0.0 6.0.0.0 7.0.0.0 8.0.0.0 9.0.0.0 10.0.0.0 System.ComponentModel.DataAnnotations 2.0.5.0 3.5.0.0 4.0.0.0 [get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")] [<get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>] System.String Gets or sets an error message to associate with a validation control if validation fails. The error message that is associated with the validation control. Property System.ComponentModel.Annotations 4.0.10.0 4.1.0.0 4.2.0.0 4.2.1.0 4.3.0.0 4.3.1.0 5.0.0.0 6.0.0.0 7.0.0.0 8.0.0.0 9.0.0.0 10.0.0.0 System.ComponentModel.DataAnnotations 2.0.5.0 3.5.0.0 4.0.0.0 [get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")] [<get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>] System.String Gets or sets the error message resource name to use in order to look up the property value if validation fails. The error message resource that is associated with a validation control. property together with the property in order to provide a localized error message. ]]> Property System.ComponentModel.Annotations 4.0.10.0 4.1.0.0 4.2.0.0 4.2.1.0 4.3.0.0 4.3.1.0 5.0.0.0 6.0.0.0 7.0.0.0 8.0.0.0 9.0.0.0 10.0.0.0 System.ComponentModel.DataAnnotations 2.0.5.0 3.5.0.0 4.0.0.0 [System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.NonPublicProperties | System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicProperties)] [<System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.NonPublicProperties | System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicProperties)>] [get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")] [<get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>] System.Type Gets or sets the resource type to use for error-message lookup if validation fails. The type of error message that is associated with a validation control. property together with the property in order to provide a localized error message. ]]> Property System.ComponentModel.Annotations 4.0.10.0 4.1.0.0 4.2.0.0 4.2.1.0 4.3.0.0 4.3.1.0 5.0.0.0 6.0.0.0 7.0.0.0 8.0.0.0 9.0.0.0 10.0.0.0 System.ComponentModel.DataAnnotations 2.0.5.0 3.5.0.0 4.0.0.0 [System.Runtime.CompilerServices.Nullable(1)] [<System.Runtime.CompilerServices.Nullable(1)>] System.String Gets the localized validation error message. The localized validation error message. property or by evaluating the and properties. The two cases are mutually exclusive. The second case is used if you want to display a localized error message. ]]> Method System.ComponentModel.Annotations 4.0.10.0 4.1.0.0 4.2.0.0 4.2.1.0 4.3.0.0 4.3.1.0 5.0.0.0 6.0.0.0 7.0.0.0 8.0.0.0 9.0.0.0 10.0.0.0 System.ComponentModel.DataAnnotations 2.0.5.0 3.5.0.0 4.0.0.0 System.String The name to include in the formatted message. Applies formatting to an error message, based on the data field where the error occurred. An instance of the formatted error message. property. This method appends the name of the data field that triggered the error to the formatted error message. You can customize how the error message is formatted by creating a derived class that overrides this method. ]]> The current attribute is malformed. Method System.ComponentModel.Annotations 4.0.10.0 4.1.0.0 4.2.0.0 4.2.1.0 4.3.0.0 4.3.1.0 5.0.0.0 6.0.0.0 7.0.0.0 8.0.0.0 9.0.0.0 10.0.0.0 System.ComponentModel.DataAnnotations 2.0.5.0 4.0.0.0 System.ComponentModel.DataAnnotations.ValidationResult [System.Runtime.CompilerServices.Nullable(1)] [<System.Runtime.CompilerServices.Nullable(1)>] The value to validate. The context information about the validation operation. Checks whether the specified value is valid with respect to the current validation attribute. An instance of the class. method checks validity without throwing an exception. ]]> The current attribute is malformed. is . has not been implemented by a derived class. System.ComponentModel.Annotations 4.1.0.0 4.2.0.0 Checks whether the specified object is valid. Method System.ComponentModel.Annotations 4.0.10.0 4.1.0.0 4.2.0.0 4.2.1.0 4.3.0.0 4.3.1.0 5.0.0.0 6.0.0.0 7.0.0.0 8.0.0.0 9.0.0.0 10.0.0.0 System.ComponentModel.DataAnnotations 2.0.5.0 3.5.0.0 4.0.0.0 System.Boolean The value of the object to validate. Determines whether the specified value of the object is valid. if the specified value is valid; otherwise, . class, you must implement the validation logic in this method. ]]> The current attribute is malformed. Neither overload of has been implemented by a derived class. Method System.ComponentModel.Annotations 4.0.10.0 4.1.0.0 4.2.0.0 4.2.1.0 4.3.0.0 4.3.1.0 5.0.0.0 6.0.0.0 7.0.0.0 8.0.0.0 9.0.0.0 10.0.0.0 System.ComponentModel.DataAnnotations 2.0.5.0 4.0.0.0 System.ComponentModel.DataAnnotations.ValidationResult [System.Runtime.CompilerServices.Nullable(1)] [<System.Runtime.CompilerServices.Nullable(1)>] The value to validate. The context information about the validation operation. Validates the specified value with respect to the current validation attribute. An instance of the class. To be added. The current attribute is malformed. has not been implemented by a derived class. Property System.ComponentModel.Annotations 4.0.10.0 4.1.0.0 4.2.0.0 4.2.1.0 4.3.0.0 4.3.1.0 5.0.0.0 6.0.0.0 7.0.0.0 8.0.0.0 9.0.0.0 10.0.0.0 System.ComponentModel.DataAnnotations 2.0.5.0 4.0.0.0 System.Boolean Gets a value that indicates whether the attribute requires validation context. if the attribute requires validation context; otherwise, . To be added. System.ComponentModel.Annotations 4.1.0.0 4.2.0.0 Validates the specified object. Method System.ComponentModel.Annotations 4.0.10.0 4.1.0.0 4.2.0.0 4.2.1.0 4.3.0.0 4.3.1.0 5.0.0.0 6.0.0.0 7.0.0.0 8.0.0.0 9.0.0.0 10.0.0.0 System.ComponentModel.DataAnnotations 2.0.5.0 4.0.0.0 System.Void [System.Runtime.CompilerServices.Nullable(2)] [<System.Runtime.CompilerServices.Nullable(2)>] The object to validate. The object that describes the context where the validation checks are performed. This parameter cannot be . Validates the specified object. method to determine whether the object that is specified by the `value` parameter is valid. If the method returns `false`, this method calls the method to get a localized message that states the problem. It then throws a exception. ]]> Validation failed. The current attribute is malformed. has not been implemented by a derived class. Method System.ComponentModel.Annotations 4.0.10.0 4.1.0.0 4.2.0.0 4.2.1.0 4.3.0.0 4.3.1.0 5.0.0.0 6.0.0.0 7.0.0.0 8.0.0.0 9.0.0.0 10.0.0.0 System.ComponentModel.DataAnnotations 2.0.5.0 3.5.0.0 4.0.0.0 System.Void [System.Runtime.CompilerServices.Nullable(2)] [<System.Runtime.CompilerServices.Nullable(2)>] The value of the object to validate. The name to include in the error message. Validates the specified object. attribute is declared. It calls the method and passes `value` as a parameter. If validation fails, a exception is thrown. ]]> is not valid. The current attribute is malformed.