C# Class ExpressiveAnnotations.Attributes.RequiredIfAttribute

Inheritance: System.ComponentModel.DataAnnotations.ValidationAttribute
Datei anzeigen Open project: jwaliszko/ExpressiveAnnotations

Public Methods

Method Description
RequiredIfAttribute ( string expression ) : System

Initializes a new instance of the RequiredIfAttribute class.

Protected Methods

Method Description
IsValidInternal ( object value, System.ComponentModel.DataAnnotations.ValidationContext validationContext ) : System.ComponentModel.DataAnnotations.ValidationResult

Validates a specified value with respect to the associated validation attribute. Internally used by the ExpressiveAttribute.IsValid(object,System.ComponentModel.DataAnnotations.ValidationContext) method.

Private Methods

Method Description
AssertNonValueType ( object value ) : void

Method Details

IsValidInternal() protected method

Validates a specified value with respect to the associated validation attribute. Internally used by the ExpressiveAttribute.IsValid(object,System.ComponentModel.DataAnnotations.ValidationContext) method.
protected IsValidInternal ( object value, System.ComponentModel.DataAnnotations.ValidationContext validationContext ) : System.ComponentModel.DataAnnotations.ValidationResult
value object The value to validate.
validationContext System.ComponentModel.DataAnnotations.ValidationContext The validation context.
return System.ComponentModel.DataAnnotations.ValidationResult

RequiredIfAttribute() public method

Initializes a new instance of the RequiredIfAttribute class.
public RequiredIfAttribute ( string expression ) : System
expression string The logical expression based on which requirement condition is computed.
return System