C# Class DataAnnotationsExtensions.ServerOnlyValidators.RequiredHttpAttribute

Inheritance: System.ComponentModel.DataAnnotations.RequiredAttribute
Mostrar archivo Open project: srkirkland/DataAnnotationsExtensions Class Usage Examples

Public Methods

Method Description
IsValid ( object value ) : bool

Validates the specified value.

Protected Methods

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

Validates the specified value with respect to the current validation attribute.

RequiredInContext ( HttpContext context ) : bool

Determines if the provided HTTP context permits validation.

Method Details

IsValid() protected method

Validates the specified value with respect to the current validation attribute.
protected IsValid ( object value, System.ComponentModel.DataAnnotations.ValidationContext validationContext ) : System.ComponentModel.DataAnnotations.ValidationResult
value object The value to validate.
validationContext System.ComponentModel.DataAnnotations.ValidationContext The context information about the validation operation.
return System.ComponentModel.DataAnnotations.ValidationResult

IsValid() public method

Validates the specified value.
public IsValid ( object value ) : bool
value object The value to validate.
return bool

RequiredInContext() protected method

Determines if the provided HTTP context permits validation.
protected RequiredInContext ( HttpContext context ) : bool
context System.Web.HttpContext The HTTP context.
return bool