|
ValidatorEntryFull pathMadWidgets.Validation.ValidatorEntry
Declarationpublic abstract class ValidatorEntry
OverviewThe ValidatorEntry class is the base class for all validation entries. Instances of this class are added to the Validator control for validation. Each subclass of this class represents a particular type of validation rule. The ValidatorEntry class does not by itself perform any validation as this is left up to the subclasses. Subclasses must override the abstract method RunValidation of the ValidatorEntry class.ConstructorsPublic propertiesPublic methodsPublic static methods
Protected methodsConstructorsValidatorEntrypublic ValidatorEntry(string sMessage, bool bNegate)
Creates a ValidatorEntry object with the supplied message and negation. If negate is true, the result of RunValidation is negated and can be accessed via the IsValid property. Public propertiesErrorMessagepublic virtual string ErrorMessage {get;}
Returns the error message supplied in the constructor. FirstObjectpublic virtual object FirstObject {get;}
Returns the first object being validated by the ValidatorEntry subclass. This property must be overridden by the subclass if the subclass can be used inside a validation group. The FirstObject is also used in the "show me" anchor of the validation summary message. The "show me" anchor links to the client-side object that FirstObject represents. IsValidpublic virtual bool IsValid {get;}
Returns true if the ValidatorEntry is in a true state. This is normally called by the Validator control when Validator.IsValid {get;} is called. The initial valid state of all ValidatorEntry objects is true except the ValidatorEntryPreset which is false. Negatepublic virtual bool Negate {get;}
Returns the negate state of the ValidatorEntry object. If the entry is set to negate (as determined by the negate parameter of the constructor), the result of the RunValidation method is negated before it is stored in the valid flag. Public methodsContainsObjectpublic bool ContainsObject(object o)
Returns true if this entry or any sub entry of this entry contains the object passed. Validatepublic void Validate()
Forces the ValidatorEntry to validate itself. This is called by the Validator control when the Validate() method of the control is called. Public static methodsGetGroupForObjectpublic static string GetGroupForObject(object o)
See GetGroupForObject from the Validator control. GetObjectIdpublic static string GetObjectId(object o)
See GetObjectId from the Validator control. GetValidationValuepublic static string GetValidationValue(object o)
See GetValidationValue from the Validator control. StringToClientSidepublic static string StringToClientSide(string sText)
See StringToClientSide from the Validator control. Protected methodsRunValidationprotected abstract bool RunValidation()
Called internally when the ValidatorEntry object is instructed to validate itself. Subclasses of the ValidatorEntry must override this method. © 2002 - 2009 Copyright, Disclaimer and Privacy Statement |
||||||