The Validator.enabled property lets you enable and disable a validator. When the value of the enabled property is true, the validator is enabled; when the value is false, the validator is disabled. When a validator is disabled, it dispatches no events, and the validate() method returns null.
For example, you can set the enabled property using data binding, as the following code shows:
Code Samples:
<?xml version=”1.0″?><!– validators\EnableVal.mxml –>
Read more…
The Validator class, the base class for all Flex validators, contains a required property that when set to true causes validation to fail when a field is empty. You use this property to configure the validator to fail when a user does not enter data in a required input field.
You typically call the validate() method to invoke a validator on a required field. This is often necessary because you cannot guarantee that an event occurs to trigger the validation– an empty input field often means that the user never gave the input control focus.
home |
about | submit an Application | tags | site map | contact us
© Learn Flex 2008, All rights Reserved.

