Packagecom.electrotank.electroserver4.message
Classpublic class ValidationResponse

This class is used to wrap a true/false validation decsion and store a list of problems if validation failed. When you invoke the validation() method of any message (request, response, event), a ValidationResponse is returned.



Public Methods
 MethodDefined by
  
ValidationResponse(isValid:Boolean, problems:Array)
Creates a new instance of the ValiationResponse class.
ValidationResponse
  
getIsValid():Boolean
Returns a boolean value specifying if the validation suceeded or failed.
ValidationResponse
  
getProblems():Array
Retunrs an array of strings.
ValidationResponse
Constructor detail
ValidationResponse()constructor
public function ValidationResponse(isValid:Boolean, problems:Array)

Creates a new instance of the ValiationResponse class. Pass in true/false to specify if the validation succeeded or not, and an array of problems if it failed.

Parameters
isValid:Boolean — True or false. Pass in true if validation succeeded.
 
problems:Array — If validation failed then pass in an array of issues. In this API we use an array of strings.
Method detail
getIsValid()method
public function getIsValid():Boolean

Returns a boolean value specifying if the validation suceeded or failed. If true, it succeeded.

Returns
Boolean — True or false.
getProblems()method 
public function getProblems():Array

Retunrs an array of strings.

Returns
Array — An array of strings.