C# Class CompareAttribute, i18N-Complete

Inheritance: System.Web.Mvc.CompareAttribute
Datei anzeigen Open project: adaptabi/i18N-Complete Class Usage Examples

Public Methods

Method Description
CompareAttribute ( string otherProperty ) : System

Initializes a new instance of the T:System.Web.Mvc.CompareAttributeclass.

ErrorMessage is set to:

'{0}' and '{1}' do not match.

CompareAttribute ( string errorMessage, string otherProperty ) : System

Initializes a new instance of the T:System.Web.Mvc.CompareAttribute class.

FormatErrorMessage ( string name ) : string

Applies formatting to a specified error message.

Method Details

CompareAttribute() public method

Initializes a new instance of the T:System.Web.Mvc.CompareAttributeclass.

ErrorMessage is set to:

'{0}' and '{1}' do not match.

public CompareAttribute ( string otherProperty ) : System
otherProperty string The property to compare with the current property.
return System

CompareAttribute() public method

Initializes a new instance of the T:System.Web.Mvc.CompareAttribute class.
public CompareAttribute ( string errorMessage, string otherProperty ) : System
errorMessage string An error message to associate with a validation control if validation fails.
otherProperty string The property to compare with the current property.
return System

FormatErrorMessage() public method

Applies formatting to a specified error message.
public FormatErrorMessage ( string name ) : string
name string The name of the field that caused the validation failure.
return string