Method | Description | |
---|---|---|
FormatErrorMessage ( string name ) : string |
Applies formatting to an error message, based on the data field where the error occurred.
|
|
RequiredIfAttribute ( string otherProperty, object otherPropertyValue ) |
Initializes a new instance of the RequiredIfAttribute class.
|
Method | Description | |
---|---|---|
IsValid ( object value, ValidationContext, validationContext ) : ValidationResult, |
Validates the specified value with respect to the current validation attribute.
|
public FormatErrorMessage ( string name ) : string | ||
name | string | The name to include in the formatted message. |
return | string |
protected IsValid ( object value, ValidationContext, validationContext ) : ValidationResult, | ||
value | object | The value to validate. |
validationContext | ValidationContext, | The context information about the validation operation. |
return | ValidationResult, |
public RequiredIfAttribute ( string otherProperty, object otherPropertyValue ) | ||
otherProperty | string | The other property. |
otherPropertyValue | object | The other property value. |