套件 | mx.validators |
類別 | public class ValidationResult |
繼承 | ValidationResult Object |
子類別 | RegExpValidationResult |
語言版本: | ActionScript 3.0 |
產品版本: | Flex 3 |
執行階段版本: | 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.
相關 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 | ||
subField : String
The name of the subfield that the result is associated with. | ValidationResult |
方法 | 定義自 | ||
---|---|---|---|
ValidationResult(isError:Boolean, subField:String = "", errorCode:String = "", errorMessage:String = "")
Constructor
| ValidationResult | ||
指出物件是否有已定義的指定屬性。 | Object | ||
指出 Object 類別的實體是否位於指定為參數的物件原型鏈中。 | Object | ||
指出指定的屬性是否存在,以及是否可列舉。 | Object | ||
為迴圈作業設定動態屬性的可用性。 | Object | ||
傳回代表此物件的字串,根據地區特定慣例進行格式化。 | Object | ||
會傳回指定之物件的字串形式。 | Object | ||
會傳回指定之物件的基本值。 | Object |
errorCode | 屬性 |
public var errorCode:String
語言版本: | ActionScript 3.0 |
產品版本: | Flex 3 |
執行階段版本: | Flash Player 9, AIR 1.1 |
The validation error code
if the value of the isError
property is true
.
errorMessage | 屬性 |
public var errorMessage:String
語言版本: | ActionScript 3.0 |
產品版本: | Flex 3 |
執行階段版本: | Flash Player 9, AIR 1.1 |
The validation error message
if the value of the isError
property is true
.
isError | 屬性 |
public var isError:Boolean
語言版本: | ActionScript 3.0 |
產品版本: | Flex 3 |
執行階段版本: | Flash Player 9, AIR 1.1 |
Contains true
if the field generated a validation failure.
subField | 屬性 |
public var subField:String
語言版本: | ActionScript 3.0 |
產品版本: | Flex 3 |
執行階段版本: | 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 | () | 建構函式 |
public function ValidationResult(isError:Boolean, subField:String = "", errorCode:String = "", errorMessage:String = "")
語言版本: | 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.
|
Tue Jun 12 2018, 03:47 PM Z