Метод | Описание | |
---|---|---|
__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. |
Метод | Описание | |
---|---|---|
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. |
Метод | Описание | |
---|---|---|
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 ( ) : |
||
Результат | javascript validator event options. |
abstract protected evaluateIsValid ( ) : boolean | ||
Результат | boolean | whether the validation succeeds |
abstract protected getClientClassName ( ) : string | ||
Результат | string | the javascript class name |
protected getClientScriptOptions ( ) : array | ||
Результат | array | javascript validator options. |
public getClientSide ( ) : |
||
Результат | javascript validator event options. |
public getControlCssClass ( ) : string | ||
Результат | string | the css class that is applied to the control being validated in case the validation fails |
public getControlToValidate ( ) : string | ||
Результат | string | the ID path of the input control to validate |
public getDisplay ( ) : |
||
Результат | the style of displaying the error message. Defaults to TValidatorDisplayStyle::Fixed. |
public getEnableClientScript ( ) : boolean | ||
Результат | boolean | whether client-side validation is enabled. |
public getErrorMessage ( ) : string | ||
Результат | string | the text for the error message. |
public getFocusElementID ( ) : string | ||
Результат | string | the ID of the HTML element to receive focus |
public getFocusOnError ( ) : boolean | ||
Результат | boolean | whether to set focus at the validating place if the validation fails. Defaults to false. |
public getIsValid ( ) : boolean | ||
Результат | boolean | whether the validation succeeds |
public getValidationGroup ( ) : string | ||
Результат | string | the group which this validator belongs to |
public getValidationTarget ( ) : TControl | ||
Результат | TControl | control to be validated. Null if no control is found. |
protected getValidationValue ( $control ) : string | ||
Результат | 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 | ||
Результат | boolean | true if change, false otherwise. |