Customvalidator Class (Flash Professional Only) - MACROMEDIA FLASH 8-COMPONENTS LANGUAGE Reference

Components language reference
Table of Contents

Advertisement

CustomValidator class (Flash
Professional only)
ActionScript Class Name
You use the CustomValidator class when you want to perform custom validation of a data
field contained by a component.
To create a custom validator class, you first create a subclass of
mx.data.binding.CustomValidator that implements a method named
method is automatically passed a value to be validated. For more information about how to
implement this method, see
Next, you assign your custom validator class to a field of a component by using the
Component inspector's Schema tab. For an example of creating and using a custom validator
class, see the Example section in the
To assign a custom validator:
1.
In the Component inspector, select the Schema tab.
2.
Select the field you want to validate, and then select Custom from the Data Type
pop-up menu.
3.
Select the Validation Options field (at the bottom of the Schema tab), and click the
magnifying glass icon to open the Custom Validation Settings dialog box.
4.
In the ActionScript Class text box, enter the name of the custom validator class you created.
In order for the class you specify to be included in the published SWF file, it must be in
the classpath.
To make this class available at runtime, you must include the data binding classes in
your FLA file.
For an overview of the classes in the mx.data.binding package, see
mx.data.binding package (Flash Professional only)" on page
Method summary for the CustomValidator class
The following table lists the methods of the CustomValidator class.
Method
CustomValidator.validate()
CustomValidator.validationError()
216
Data binding classes (Flash Professional only)
mx.data.binding.CustomValidator
CustomValidator.validate()
CustomValidator.validate()
Description
Performs validation on data.
Reports validation errors.
validate()
.
entry.
"Classes in the
208.
. This

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH 8-COMPONENTS LANGUAGE and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Flash 8

Table of Contents