Subclassed instances of the Validator class provide the logic to validate another object
and provide a description of any errors encountered during the validation process.
They are typically associated with a 'validators' property on the following types:
EntityType, DataProperty or NavigationProperty.
A number of property level validators are registered automatically, i.e added to each DataProperty.Validators
property based on DataProperty metadata. For example,
DataProperty.MaxLength -> MaxLengthValidator
DataProperty.IsNullable -> RequiredValidator (if not nullable)
Inheritance Hierarchy
Breeze.SharpInternable
Breeze.SharpValidator
Breeze.SharpMaxLengthValidator
Breeze.SharpRangeValidatorT
Breeze.SharpRegexValidator
Breeze.SharpRequiredValidator
Breeze.SharpStringLengthValidator
Namespace: Breeze.Sharp
Assembly: Breeze.Sharp (in Breeze.Sharp.dll) Version: 0.6.0.5 (0.6.0.5)
Syntax
The Validator type exposes the following members.
Constructors
Name | Description | |
---|---|---|
Validator | Initializes a new instance of the Validator class |
Methods
Name | Description | |
---|---|---|
Equals | (Inherited from Internable.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
FindOrCreate |
For internal use only - used during validator deserialization.
| |
GetErrorMessage |
Provides the error message associated with a failure of this validator.
| |
GetHashCode | (Inherited from Internable.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
ToString | Returns a string that represents the current object. (Inherited from Object.) | |
Validate |
Performs validation given a specified context.
| |
ValidateCore |
Provides the core validation logic to this validator.
|
Fields
Name | Description | |
---|---|---|
Suffix |
Properties
Name | Description | |
---|---|---|
LocalizedKey | ||
LocalizedMessage | ||
Name | (Inherited from Internable.) |
Remarks
See Also