CustomValidator.validationError()

Availability

Flash Player 6 (6.0.79.0).

Edition

Flash MX Professional 2004.

Usage

this.validationError(errorMessage)

NOTE

This method can be invoked only from within a custom validator class; the keyword this refers to the current CustomValidator object.

Parameters

errorMessage A string that contains the error message to be reported.

Returns

Nothing.

Description

Method; called from the validate() method of your subclass of CustomValidator to report validation errors. If you don't call validationError(), a valid event is generated when validate() finishes executing. If you call validationError() one or more times from within the validate(), an invalid event is generated after validate() returns.

Each message you pass to validationError() is available in the messages property of the event object that was passed to the invalid event handler.

Example

See the Example section for CustomValidator.validate().