Packagemx.validators
Classpublic class ValidationResult

The ValidationResult class contains the results of a validation.

The ValidationResultEvent class defines the event object that is passed to event listeners for the valid and invalid validator events. The class also defines the results property, which contains an Array of ValidationResult objects, one for each field examined by the validator. This lets you access the ValidationResult objects from within an event listener.

See also

mx.events.ValidationResultEvent


Public Properties
 PropertyDefined by
  errorCode : String
The validation error code if the value of the isError property is true.
ValidationResult
  errorMessage : String
The validation error message if the value of the isError property is true.
ValidationResult
  isError : Boolean
Contains true if the field generated a validation failure.
ValidationResult
  subField : String
The name of the subfield that the result is associated with.
ValidationResult
Public Methods
 MethodDefined by
  
ValidationResult(isError:Boolean, subField:String = "", errorCode:String = "", errorMessage:String = "")
Constructor
ValidationResult
Property detail
errorCodeproperty
public var errorCode:String

The validation error code if the value of the isError property is true.

errorMessageproperty 
public var errorMessage:String

The validation error message if the value of the isError property is true.

isErrorproperty 
public var isError:Boolean

Contains true if the field generated a validation failure.

subFieldproperty 
public var subField:String

The name of the subfield that the result is associated with. Some validators, such as CreditCardValidator and DateValidator, validate multiple subfields at the same time.

Constructor detail
ValidationResult()constructor
public function ValidationResult(isError:Boolean, subField:String = "", errorCode:String = "", errorMessage:String = "")

Constructor

Parameters
isError:Boolean — Pass true if there was a validation error.
 
subField:String (default = "") — Name of the subfield of the validated Object.
 
errorCode:String (default = "") — Validation error code.
 
errorMessage:String (default = "") — Validation error message.