Package | mx.validators |
Class | public class ValidationResult |
Inheritance | ValidationResult Object |
Subclasses | RegExpValidationResult |
Language Version: | ActionScript 3.0 |
Product Version: | Flex 3 |
Runtime Versions: | Flash Player 9, AIR 1.1 |
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.
Related API Elements
Property | Defined By | ||
---|---|---|---|
constructor : Object
A reference to the class object or constructor function for a given object instance. | Object | ||
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 |
Method | Defined By | ||
---|---|---|---|
ValidationResult(isError:Boolean, subField:String = "", errorCode:String = "", errorMessage:String = "")
Constructor
| ValidationResult | ||
Indicates whether an object has a specified property defined. | Object | ||
Indicates whether an instance of the Object class is in the prototype chain of the object specified
as the parameter. | Object | ||
Indicates whether the specified property exists and is enumerable. | Object | ||
Sets the availability of a dynamic property for loop operations. | Object | ||
Returns the string representation of this object, formatted according to locale-specific conventions. | Object | ||
Returns the string representation of the specified object. | Object | ||
Returns the primitive value of the specified object. | Object |
errorCode | property |
public var errorCode:String
Language Version: | ActionScript 3.0 |
Product Version: | Flex 3 |
Runtime Versions: | Flash Player 9, AIR 1.1 |
The validation error code
if the value of the isError
property is true
.
errorMessage | property |
public var errorMessage:String
Language Version: | ActionScript 3.0 |
Product Version: | Flex 3 |
Runtime Versions: | Flash Player 9, AIR 1.1 |
The validation error message
if the value of the isError
property is true
.
isError | property |
public var isError:Boolean
Language Version: | ActionScript 3.0 |
Product Version: | Flex 3 |
Runtime Versions: | Flash Player 9, AIR 1.1 |
Contains true
if the field generated a validation failure.
subField | property |
public var subField:String
Language Version: | ActionScript 3.0 |
Product Version: | Flex 3 |
Runtime Versions: | Flash Player 9, AIR 1.1 |
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.
ValidationResult | () | Constructor |
public function ValidationResult(isError:Boolean, subField:String = "", errorCode:String = "", errorMessage:String = "")
Language Version: | ActionScript 3.0 |
Product Version: | Flex 3 |
Runtime Versions: | Flash Player 9, AIR 1.1 |
Constructor
ParametersisError: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.
|
Wed Nov 21 2018, 06:34 AM -08:00