Returns
An unformatted value.
Description
Method; converts from a string, or other data type, to the raw data type. This transformation
should be the exact inverse transformation of
This method is not implemented by default. You must define it in your subclass of
mx.data.binding.CustomFormatter.
For more information, see
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
validated. For more information about how to implement this method, see
CustomValidator.validate()
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:
In the Component inspector, select the Schema tab.
1.
Select the field you want to validate, and then select Custom from the Data Type pop-up menu.
2.
Select the Validation Options field (at the bottom of the Schema tab), and click the magnifying
3.
glass icon to open the Custom Validation Settings dialog box.
In the ActionScript Class text box, enter the name of the custom validator class you created.
4.
In order for the class you specify to be included in the published SWF file, it must be in
the classpath.
Note: To make this class available at runtime, you must include the data binding classes in your FLA
document. .
For an overview of the classes in the mx.data.binding package, see
package (Flash Professional only)" on page
220
Chapter 6: Components Dictionary
"Sample custom formatter" on page
mx.data.binding.CustomValidator
validate()
.
CustomValidator.validate()
213.
CustomFormatter.format()
217.
. This method is automatically passed a value to be
entry.
"Classes in the mx.data.binding
.
Need help?
Do you have a question about the FLASH MX 2004-USING COMPONENTS and is the answer not in the manual?