套件 | mx.validators |
類別 | public class RegExpValidationResult |
繼承 | RegExpValidationResult ValidationResult Object |
語言版本: | ActionScript 3.0 |
產品版本: | Flex 3 |
執行階段版本: | Flash Player 9, AIR 1.1 |
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.
相關 API 元素
屬性 | 定義自 | ||
---|---|---|---|
constructor : Object
類別物件的參照或是特定物件實體的建構函數。 | 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 | ||
matchedIndex : int
An integer that contains the starting index
in the input String of the match. | RegExpValidationResult | ||
matchedString : String
A String that contains the substring of the input String
that matches the regular expression. | RegExpValidationResult | ||
matchedSubstrings : Array
An Array of Strings that contains parenthesized
substring matches, if any. | RegExpValidationResult | ||
subField : String
The name of the subfield that the result is associated with. | ValidationResult |
方法 | 定義自 | ||
---|---|---|---|
RegExpValidationResult(isError:Boolean, subField:String = "", errorCode:String = "", errorMessage:String = "", matchedString:String = "", matchedIndex:int = 0, matchedSubstrings:Array = null)
Constructor
| RegExpValidationResult | ||
指出物件是否有已定義的指定屬性。 | Object | ||
指出 Object 類別的實體是否位於指定為參數的物件原型鏈中。 | Object | ||
指出指定的屬性是否存在,以及是否可列舉。 | Object | ||
為迴圈作業設定動態屬性的可用性。 | Object | ||
傳回代表此物件的字串,根據地區特定慣例進行格式化。 | Object | ||
會傳回指定之物件的字串形式。 | Object | ||
會傳回指定之物件的基本值。 | Object |
matchedIndex | 屬性 |
public var matchedIndex:int
語言版本: | ActionScript 3.0 |
產品版本: | Flex 3 |
執行階段版本: | Flash Player 9, AIR 1.1 |
An integer that contains the starting index in the input String of the match.
matchedString | 屬性 |
public var matchedString:String
語言版本: | ActionScript 3.0 |
產品版本: | Flex 3 |
執行階段版本: | Flash Player 9, AIR 1.1 |
A String that contains the substring of the input String that matches the regular expression.
matchedSubstrings | 屬性 |
public var matchedSubstrings:Array
語言版本: | ActionScript 3.0 |
產品版本: | Flex 3 |
執行階段版本: | 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.
RegExpValidationResult | () | 建構函式 |
public function RegExpValidationResult(isError:Boolean, subField:String = "", errorCode:String = "", errorMessage:String = "", matchedString:String = "", matchedIndex:int = 0, matchedSubstrings:Array = null)
語言版本: | ActionScript 3.0 |
產品版本: | Flex 3 |
執行階段版本: | Flash Player 9, AIR 1.1 |
Constructor
參數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.
| |
matchedString:String (default = " ") — Matching substring.
| |
matchedIndex:int (default = 0 ) — Index of the matching String.
| |
matchedSubstrings:Array (default = null ) — Array of substring matches.
|
Tue Jun 12 2018, 03:47 PM Z