PHP Interface Prado\Web\UI\IValidator

If a control wants to validate user input, it must implement this interface.
Since: 3.0
Author: Qiang Xue ([email protected])
ファイルを表示 Open project: pradosoft/prado

Public Methods

Method Description
getErrorMessage ( ) : string
getIsValid ( ) : boolean
setErrorMessage ( $value )
setIsValid ( $value )
validate ( ) : boolean Validates certain data.

Method Details

getErrorMessage() public method

public getErrorMessage ( ) : string
return string error message during last validate

getIsValid() public method

public getIsValid ( ) : boolean
return boolean whether the previous {@link validate()} is successful.

setErrorMessage() public method

public setErrorMessage ( $value )

setIsValid() public method

public setIsValid ( $value )

validate() public method

The implementation of this function should validate certain data (e.g. data entered into TTextBox control).
public validate ( ) : boolean
return boolean whether the data passes the validation