MACROMEDIA FLASH MX 2004-USING FLASH Use Manual page 299

Hide thumbs Also See for FLASH MX 2004-USING FLASH:
Table of Contents

Advertisement

Custom
Lets you add a custom class to check for this special kind of validation. Your code
should call the validate function when the field is assigned a new value, inspect the value, and
determine whether it's valid. If it is, the function should simply return. If not, the function should
call
this.ValidationError("some informative message");
the classpath and formatted as shown in the following example:
class myCustomType extends mx.databinding.CustomValidator {
function validate(value) {
... some code here
}
}
DataProvider
No validation options.
Date
No validation options.
DeltaPacket
No validation options.
Integer
A validation option can be set up to define the minimum and maximum values.
Number
A validation option can be set up to define the minimum and maximum values.
Object
No validation options.
PhoneNumber
No validation options.
SocialSecurity
No validation options.
String
A validation option can be set up to define the minimum and maximum number of
characters.
XML
Lets you specify if white space should be ignored when a string is converted into XML.
ZipCode
No validation options.
Note: The following data types can perform validation: Custom, Integer, Number, PhoneNumber,
SocialSecurity, String, ZipCode. The following data types can convert from various other data types
when you assign to them: Boolean, DataProvider, Integer, Number, String, XML.
You can create custom data types. The number of data types allowed is unlimited. Data types are
defined by XML files found in the Flash MX Professional 2004 Configuration/DataTypes folder.
The definition includes the following metadata:
An ActionScript class that will be instantiated for validation and type conversion
A Validation Options dialog box
The name of the standard formatter, which you can override using the
Initial values for required, read-only, and default values
. The custom class must be in
formatter
Advanced topics in data integration
property
299

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flash mx 2004 - actionscript

Table of Contents