메소드 | 설명 | |
---|---|---|
__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 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 setFocusElementID ( $value ) |
public setForControl ( $value ) |
public setIsValid ( $value ) |
protected updateControlCssClass ( ) : boolean | ||
리턴 | boolean | true if change, false otherwise. |