Метод | Описание | |
---|---|---|
Comparator ( string otherProperty, Operator op = Operator.EqualTo ) : System |
Will compare propery you signify in the annotation. By default, the operator is equal to. You are compoaring against the field. so greater than is field > otherProperty
|
|
Comparator ( string otherProperty, string errorMessage, Operator op = Operator.EqualTo ) : System |
Will compare propery you signify in the annotation. By default, the operator is equal to. You are compoaring against the field. so greater than is field > otherProperty
|
|
GetClientValidationRules ( ModelMetadata metadata, ControllerContext context ) : IEnumerable |
Метод | Описание | |
---|---|---|
IsValid ( object value, System.ComponentModel.DataAnnotations.ValidationContext ctx ) : System.ComponentModel.DataAnnotations.ValidationResult |
Метод | Описание | |
---|---|---|
GetErrorMessage ( string propertyName ) : string |
public Comparator ( string otherProperty, Operator op = Operator.EqualTo ) : System | ||
otherProperty | string | the property you want to compare against |
op | Operator | the operator enum you want to call in |
Результат | System |
public Comparator ( string otherProperty, string errorMessage, Operator op = Operator.EqualTo ) : System | ||
otherProperty | string | the property you want to compare against |
errorMessage | string | Custom message you want to display. |
op | Operator | the operator enum you want to call in |
Результат | System |
public GetClientValidationRules ( ModelMetadata metadata, ControllerContext context ) : IEnumerable |
||
metadata | ModelMetadata | |
context | ControllerContext | |
Результат | IEnumerable |
protected IsValid ( object value, System.ComponentModel.DataAnnotations.ValidationContext ctx ) : System.ComponentModel.DataAnnotations.ValidationResult | ||
value | object | |
ctx | System.ComponentModel.DataAnnotations.ValidationContext | |
Результат | System.ComponentModel.DataAnnotations.ValidationResult |