Méthode | Description | |
---|---|---|
__construct ( ) | Constructor. | |
getClientSide ( ) : |
Gets the TValidatorClientSide that allows modification of the client- side validator events. | |
getControlCssClass ( ) : string | ||
getControlToValidate ( ) : string | ||
getDisplay ( ) : |
||
getEnableClientScript ( ) : boolean | ||
getErrorMessage ( ) : string | ||
getFocusElementID ( ) : string | Gets the ID of the HTML element that will receive focus if validation fails and {@link getFocusOnError FocusOnError} is true. | |
getFocusOnError ( ) : boolean | ||
getIsValid ( ) : boolean | ||
getValidationGroup ( ) : string | ||
getValidationTarget ( ) : TControl | ||
onInit ( $param ) | Registers the validator with page. | |
onPreRender ( $param ) | Override parent implementation to update the control CSS Class before the validated control is rendered | |
onUnload ( $param ) | Unregisters the validator from page. | |
onValidate ( ) | This event is raised right before the validator starts to perform validation. | |
onValidationError ( ) | This event is raised when the validator fails in validation. | |
onValidationSuccess ( ) | This event is raised when the validator succeeds in validation. | |
renderClientControlScript ( $writer ) | Renders the javascript code to the end script. | |
renderContents ( $writer ) | Renders the validator control. | |
setControlCssClass ( $value ) | ||
setControlToValidate ( $value ) | Sets the ID path of the input control to validate. | |
setDisplay ( $value ) | ||
setEnableClientScript ( $value ) | ||
setEnabled ( $value ) | This method overrides parent's implementation by setting {@link setIsValid IsValid} to true if disabled. | |
setErrorMessage ( $value ) | Sets the text for the error message. | |
setFocusElementID ( $value ) | Sets the ID of the HTML element that will receive focus if validation fails and {@link getFocusOnError FocusOnError} is true. | |
setFocusOnError ( $value ) | ||
setForControl ( $value ) | This method overrides the parent implementation to forbid setting ForControl. | |
setIsValid ( $value ) | Sets the value indicating whether the validation succeeds | |
setValidationGroup ( $value ) | ||
validate ( ) : boolean | Validates the specified control. |
Méthode | Description | |
---|---|---|
addAttributesToRender ( $writer ) | Adds attributes to renderer. Calls parent implementation and renders the client control scripts. | |
createClientSide ( ) : |
||
evaluateIsValid ( ) : boolean | This is the major method for validation. | |
getClientClassName ( ) : string | Gets the name of the javascript class responsible for performing validation for this control. | |
getClientScriptOptions ( ) : array | Returns an array of javascript validator options. | |
getValidationValue ( $control ) : string | Retrieves the property value of the control being validated. | |
registerClientScriptValidator ( ) | Registers the individual validator client-side javascript code. | |
updateControlCssClass ( ) : boolean | Update the ControlToValidate component's css class depending if the ControlCssClass property is set, and whether this is valid. |
Méthode | Description | |
---|---|---|
getClientControlClass ( $control ) : string | Gets the Control type for client-side validation. If new cases exists in TBaseValidator::$_clientClass, be sure to update the corresponding "Javascript/validation3.js" file as well. |
protected addAttributesToRender ( $writer ) |
protected createClientSide ( ) : |
||
Résultat | javascript validator event options. |
abstract protected evaluateIsValid ( ) : boolean | ||
Résultat | boolean | whether the validation succeeds |
abstract protected getClientClassName ( ) : string | ||
Résultat | string | the javascript class name |
protected getClientScriptOptions ( ) : array | ||
Résultat | array | javascript validator options. |
public getClientSide ( ) : |
||
Résultat | javascript validator event options. |
public getControlCssClass ( ) : string | ||
Résultat | string | the css class that is applied to the control being validated in case the validation fails |
public getControlToValidate ( ) : string | ||
Résultat | string | the ID path of the input control to validate |
public getDisplay ( ) : |
||
Résultat | the style of displaying the error message. Defaults to TValidatorDisplayStyle::Fixed. |
public getEnableClientScript ( ) : boolean | ||
Résultat | boolean | whether client-side validation is enabled. |
public getErrorMessage ( ) : string | ||
Résultat | string | the text for the error message. |
public getFocusElementID ( ) : string | ||
Résultat | string | the ID of the HTML element to receive focus |
public getFocusOnError ( ) : boolean | ||
Résultat | boolean | whether to set focus at the validating place if the validation fails. Defaults to false. |
public getIsValid ( ) : boolean | ||
Résultat | boolean | whether the validation succeeds |
public getValidationGroup ( ) : string | ||
Résultat | string | the group which this validator belongs to |
public getValidationTarget ( ) : TControl | ||
Résultat | TControl | control to be validated. Null if no control is found. |
protected getValidationValue ( $control ) : string | ||
Résultat | string | property value to be validated |
public onPreRender ( $param ) |
public onValidate ( ) |
public onValidationError ( ) |
public onValidationSuccess ( ) |
protected registerClientScriptValidator ( ) |
public renderClientControlScript ( $writer ) |
public setControlToValidate ( $value ) |
public setEnabled ( $value ) |
public setErrorMessage ( $value ) |
public setFocusElementID ( $value ) |
public setForControl ( $value ) |
public setIsValid ( $value ) |
protected updateControlCssClass ( ) : boolean | ||
Résultat | boolean | true if change, false otherwise. |