The definition of the JavaScript interface for task-level validation is as follows:
public boolean validate( BLTHContext context, String attributeValue, StringRef changedValue, StringRef errorMessage );
Input parameter
Specifies an object that contains methods for retrieving information in the current task session.
Input parameter
Specifies the value of the attribute being validated.
Output parameter
Provides an optional transformation value that replaces the user-supplied value being validated. If no transformation is necessary, pass back null.
Output parameter
If validation fails, it displays a message to the user.
The message is displayed through AttributeValidationException. If the method returns false, CA IdentityMinder generates this exception.
The output parameters changedValue and errorMessage are of data type StringRef. StringRef is a predefined data type that contains the field reference to which you assign a value, as shown in the following examples:
changedValue.reference="+1 " + phoneNumber;
errorMessage.reference="Phone number " + phoneNumber + " does not match the format nnn-nnn-nnnn.";
Copyright © 2013 CA.
All rights reserved.
|
|