Edit Validate form - Completing the Java tab
Enter the body of a Java boolean function here. The value your Java code is to validate is in an automatically declared variable named
theValue.
Design the function to return true when the value is valid, and otherwise return false.
| Field | Description |
|---|---|
| Java Source | |
| Java |
Enter your Java source directly into the
Java Source
text box.
Include a Java
Note:
Use the
String.equals()
Java method, not the == or != operators, to compare the value of a property to a literal string or to the value of another property.
You can use the normal syntax to call a function rule:
where the RuleSet and library name are in lowercase but the function name is in exact case. For example:
|
To associate text from a message rule with the property, use the addMessage() PublicAPI method, as in following Java statement:
theProperty.addMessage("RuleMessageKey\tText1\tText2...");
where RuleMessageKey is a key to a Rule-Message rule, and the optional Text1, Text2 and so on are text values — separated by a backslash and literal t character — that supply values for the numbered parameters {1}, {2},... in the message rule text. (This method has no effect if the message identified by RuleMessageKey is already present.)