Class ImageValidationAttribute
Base class for constraint validation attributes that should trigger common validation
Inheritance
ImageValidationAttribute
Inherited Members
Namespace: AdaptiveImages.Validation
Assembly: AdaptiveImages.dll
Syntax
public abstract class ImageValidationAttribute : ValidationAttribute
Properties
FormFactor
Gets or sets one or more form factors for which the validation attribute applies
Declaration
public FormFactor FormFactor { get; set; }
Property Value
Type | Description |
---|---|
FormFactor |
Remarks
Bitwise OR supported, for example FormFactor.Large | FormFactor.Medium to make attribute apply to both Large and Medium form factors
RequiresValidationContext
Indicates this attribute requires validation context
Declaration
public override bool RequiresValidationContext { get; }
Property Value
Type | Description |
---|---|
bool |
Overrides
Methods
IsValid(object?)
Always returns true because image validation attributes require a validation context, actual validation is performed by AdaptiveImageValidator as validation may apply to a combination of attributes
Declaration
public override bool IsValid(object? value)
Parameters
Type | Name | Description |
---|---|---|
object | value | The property being validated |
Returns
Type | Description |
---|---|
bool | True |