Method | Description | |
---|---|---|
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 |
Method | Description | |
---|---|---|
IsValid ( object value, System.ComponentModel.DataAnnotations.ValidationContext ctx ) : System.ComponentModel.DataAnnotations.ValidationResult |
Method | Description | |
---|---|---|
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 |
return | 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 |
return | System |
public GetClientValidationRules ( ModelMetadata metadata, ControllerContext context ) : IEnumerable |
||
metadata | ModelMetadata | |
context | ControllerContext | |
return | IEnumerable |
protected IsValid ( object value, System.ComponentModel.DataAnnotations.ValidationContext ctx ) : System.ComponentModel.DataAnnotations.ValidationResult | ||
value | object | |
ctx | System.ComponentModel.DataAnnotations.ValidationContext | |
return | System.ComponentModel.DataAnnotations.ValidationResult |