PHP 클래스 Prado\Web\UI\ActiveControls\TActiveCustomValidator

Performs custom validation using only server-side {@link onServerValidate onServerValidate} validation event. The client-side uses callbacks to raise the {@link onServerValidate onServerValidate} event. Beware that the {@link onServerValidate onServerValidate} may be raised when the control to validate on the client side changes value, that is, the server validation may be called many times. After the callback or postback, the {@link onServerValidate onServerValidate} is raised once more. The {@link getIsCallback IsCallback} property will be true when validation is made during a callback request.
부터: 3.1
상속: extends Prado\Web\UI\WebControls\TCustomValidator, implements Prado\Web\UI\ActiveControls\ICallbackEventHandler, implements Prado\Web\UI\ActiveControls\IActiveControl
파일 보기 프로젝트 열기: pradosoft/prado

공개 메소드들

메소드 설명
__construct ( ) Creates a new callback control, sets the adapter to TActiveControlAdapter. If you override this class, be sure to set the adapter appropriately by, for example, by calling this constructor.
getActiveControl ( ) : TBaseActiveCallbackControl
getClientSide ( ) : TCallbackClientSide
getEnableClientScript ( ) : boolean It's mandatory for the EnableClientScript to be activated or the TActiveCustomValidator won't work.
getIsCallback ( ) : boolean
onCallback ( $param ) This method is invoked when a callback is requested. The method raises 'OnCallback' event to fire up the event handlers. If you override this method, be sure to call the parent implementation so that the event handler can be invoked.
raiseCallbackEvent ( $param ) Raises the callback event. This method is required by {@link ICallbackEventHandler} interface. The {@link onServerValidate OnServerValidate} event is raised first and then the {@link onCallback OnCallback} event.
setClientValidationFunction ( $value ) Client validation function is NOT supported.
setErrorMessage ( $value ) Sets the text for the error message. Updates client-side error message.
setIsValid ( $value )

보호된 메소드들

메소드 설명
addAttributesToRender ( $writer ) Ensure that the ID attribute is rendered and registers the javascript code for initializing the active control.
getClientClassName ( ) : string
getClientScriptOptions ( ) : array Returns an array of javascript validator options.

메소드 상세

__construct() 공개 메소드

Creates a new callback control, sets the adapter to TActiveControlAdapter. If you override this class, be sure to set the adapter appropriately by, for example, by calling this constructor.
public __construct ( )

addAttributesToRender() 보호된 메소드

Ensure that the ID attribute is rendered and registers the javascript code for initializing the active control.
protected addAttributesToRender ( $writer )

getActiveControl() 공개 메소드

public getActiveControl ( ) : TBaseActiveCallbackControl
리턴 TBaseActiveCallbackControl standard callback control options.

getClientClassName() 보호된 메소드

protected getClientClassName ( ) : string
리턴 string corresponding javascript class name for this this.

getClientScriptOptions() 보호된 메소드

Returns an array of javascript validator options.
protected getClientScriptOptions ( ) : array
리턴 array javascript validator options.

getClientSide() 공개 메소드

public getClientSide ( ) : TCallbackClientSide
리턴 TCallbackClientSide client side request options.

getEnableClientScript() 공개 메소드

It's mandatory for the EnableClientScript to be activated or the TActiveCustomValidator won't work.
public getEnableClientScript ( ) : boolean
리턴 boolean whether client-side validation is enabled.

getIsCallback() 공개 메소드

public getIsCallback ( ) : boolean
리턴 boolean true if validation is made during a callback request.

onCallback() 공개 메소드

This method is invoked when a callback is requested. The method raises 'OnCallback' event to fire up the event handlers. If you override this method, be sure to call the parent implementation so that the event handler can be invoked.
public onCallback ( $param )

raiseCallbackEvent() 공개 메소드

This method is mainly used by framework and control developers.
public raiseCallbackEvent ( $param )

setClientValidationFunction() 공개 메소드

Client validation function is NOT supported.
public setClientValidationFunction ( $value )

setErrorMessage() 공개 메소드

Sets the text for the error message. Updates client-side error message.
public setErrorMessage ( $value )

setIsValid() 공개 메소드

public setIsValid ( $value )