C# Class LayersCMS.Web.Validation.RelativeUrlAttribute

Validates that a string is a valid relative url, e.g. '/' or '/home' but not 'http://www.test.com' or 'home' or '/home/'. Warning: null or empty string values are classed as valid. Use the RequiredAttribute to combat this.
Inheritance: System.ComponentModel.DataAnnotations.ValidationAttribute
显示文件 Open project: stevekennaird/LayersCMS

Public Methods

Method Description
IsValid ( object value ) : bool
RelativeUrlAttribute ( ) : System

Method Details

IsValid() public method

public IsValid ( object value ) : bool
value object
return bool

RelativeUrlAttribute() public method

public RelativeUrlAttribute ( ) : System
return System