Class HexColorAttribute
Attribute to validate a hexadecimal color
Namespace: Sartorius.SAF.Validation
Assembly: Sartorius.SAF.dll
Syntax
public class HexColorAttribute : ValidationAttribute
Properties
View SourceRequiresValidationContext
Gets a value that indicates whether the attribute requires validation context.
Declaration
public override bool RequiresValidationContext { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Overrides
Methods
View SourceIsValid(object, ValidationContext)
Validates the specified value with respect to the current validation attribute.
Declaration
protected override ValidationResult IsValid(object value, ValidationContext validationContext)
Parameters
| Type | Name | Description |
|---|---|---|
| object | value | The value to validate. |
| ValidationContext | validationContext | The context information about the validation operation. |
Returns
| Type | Description |
|---|---|
| ValidationResult | An instance of the ValidationResult class. |