HTML/CSS Service

Showcase

1 comment0 views
1 Star2 Stars

Enabling and disabling a validator in Flex

Category: Flex Examples, Flex Samples, flex tutorials    |    2,406 views    |    1 Comment

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…

Share/Save/Bookmark

 

Flex Validating required fields

Category: flex tutorials    |    4,295 views    |    1 Comment

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.

Read more…

Share/Save/Bookmark