Language Version : | ActionScript 3.0 |
Runtime Versions : | Flash Player 9, AIR 1.1 |
The RegExpValidator class dispatches the
valid
and
invalid
events.
For an
invalid
event, the event object
is an instance of the ValidationResultEvent class,
and the
ValidationResultEvent.results
property
contains an Array of ValidationResult objects.
However, for a valid
event, the
ValidationResultEvent.results
property contains
an Array of RegExpValidationResult objects.
The RegExpValidationResult class is a child class
of the ValidationResult class, and contains additional properties
used with regular expressions.
public var matchedIndex:int
Language Version : | ActionScript 3.0 |
Runtime Versions : | Flash Player 9, AIR 1.1 |
An integer that contains the starting index
in the input String of the match.
public var matchedString:String
Language Version : | ActionScript 3.0 |
Runtime Versions : | Flash Player 9, AIR 1.1 |
A String that contains the substring of the input String
that matches the regular expression.
public var matchedSubstrings:Array
Language Version : | ActionScript 3.0 |
Runtime Versions : | Flash Player 9, AIR 1.1 |
An Array of Strings that contains parenthesized
substring matches, if any.
If no substring matches are found, this Array is of length 0.
Use matchedSubStrings[0]
to access
the first substring match.
public function RegExpValidationResult(isError:Boolean, subField:String, errorCode:String, errorMessage:String, matchedString:String, matchedIndex:int = 0, matchedSubstrings:Array = null)
Language Version : | ActionScript 3.0 |
Runtime Versions : | Flash Player 9, AIR 1.1 |
Constructor
Parameters | isError:Boolean — Pass true if there was a validation error.
|
|
| subField:String — Name of the subfield of the validated Object.
|
|
| errorCode:String — Validation error code.
|
|
| errorMessage:String — Validation error message.
|
|
| matchedString:String — Matching substring.
|
|
| matchedIndex:int (default = 0 ) — Index of the matching String.
|
|
| matchedSubstrings:Array (default = null ) — Array of substring matches.
|
Mon Feb 18 2013, 01:33 PM +11:00