C# Class System.ComponentModel.DataAnnotations.EqualToAttribute

Inheritance: System.ComponentModel.DataAnnotations.ValidationAttribute
Show file Open project: adaptabi/i18N-Complete Class Usage Examples

Public Methods

Method Description
EqualToAttribute ( string otherProperty ) : System

Creates a new instance of EqualToAttribute

EqualToAttribute ( string errorMessage, string otherProperty ) : System

Creates a new instance of EqualToAttribute

FormatErrorMessage ( string name ) : string

Applies formatting to an error message, based on the data field where the error occurred.

Protected Methods

Method Description
IsValid ( object value, System.ComponentModel.DataAnnotations.ValidationContext validationContext ) : System.ComponentModel.DataAnnotations.ValidationResult

Method Details

EqualToAttribute() public method

Creates a new instance of EqualToAttribute
public EqualToAttribute ( string otherProperty ) : System
otherProperty string
return System

EqualToAttribute() public method

Creates a new instance of EqualToAttribute
public EqualToAttribute ( string errorMessage, string otherProperty ) : System
errorMessage string
otherProperty string
return System

FormatErrorMessage() public method

Applies formatting to an error message, based on the data field where the error occurred.
public FormatErrorMessage ( string name ) : string
name string The name to include in the formatted message.
return string

IsValid() protected method

protected IsValid ( object value, System.ComponentModel.DataAnnotations.ValidationContext validationContext ) : System.ComponentModel.DataAnnotations.ValidationResult
value object
validationContext System.ComponentModel.DataAnnotations.ValidationContext
return System.ComponentModel.DataAnnotations.ValidationResult