
Validators 171
In ActionScript, you can use the following constants:
■ CreditCardValidatorCardType.AMERICAN_EXPRESS
■ CreditCardValidatorCardType.DINERS_CLUB
■ CreditCardValidatorCardType.DISCOVER
■ CreditCardValidatorCardType.MASTERCARD
■ CreditCardValidatorCardType.VISA
Deprecated methods, properties, and events
The following validator methods, properties, and events were deprecated:
Styles
When you change a validator’s error message style, you must now use a class selector rather
than a type selector. You do this by prepending a period to the
errorTip style as the following
example shows:
<mx:Style>
// ErrorTip { borderColor: #00FFFF } // Flex 1.5
.errorTip { borderColor: #00FFFF } // Flex 2
</mx:Style>
Deprecated item New item
Validator.enable() and
Validator.disable() methods
Validator.enabled property
Validator.isValid() and
Validator.isStructureValid()
Validator.validate()
method
Validator.hasErrors()
You now examine the Event object from the
validation to determine if any errors occurred.
Validator.field You now use
Validator.source and
Validator.property to specify the item to
validate.
UIComponent.validationFailed and
UIComponent.validationSucceeded events
UIComponent.valid and UIComponent.invalid
events, or Validator.valid and
Validator.invalid events
Komentáře k této Příručce