C# Class JustPressPlay.CharacterValidatorAttribute

Validates text line input based on a particular pattern
Inheritance: System.ComponentModel.DataAnnotations.RegularExpressionAttribute, IClientValidatable
Mostra file Open project: RIT-MAGIC/JustPressPlay

Public Methods

Method Description
CharacterValidatorAttribute ( bool allowNewLine = false ) : System

Constructor for the attribute - sets up the error message

GetClientValidationRules ( ModelMetadata metadata, ControllerContext context ) : IEnumerable

Gets the validation rules for this attribute

Method Details

CharacterValidatorAttribute() public method

Constructor for the attribute - sets up the error message
public CharacterValidatorAttribute ( bool allowNewLine = false ) : System
allowNewLine bool
return System

GetClientValidationRules() public method

Gets the validation rules for this attribute
public GetClientValidationRules ( ModelMetadata metadata, ControllerContext context ) : IEnumerable
metadata ModelMetadata
context ControllerContext
return IEnumerable