validValues

The validValues property (formerly the range property) indicates a set of values that are valid for user input. The property is used for numeric or character fields.

The property specifies an array literal of singular and two-value elements, as in the following examples:
  validValues = [ [1,3], 5, 12 ]
  validValues = [ "a", ["d", "i"]] 
Each singular element contains a valid value. Each two-value element contains a range. The following guidelines apply:

If the user's input is outside the specified range, EGL displays an error message; see validValuesMsgKey.

Examples

The following additional examples show possible ranges for the property:
  // valid values are 1, 2, 3, 5, 7, and 11
  validValues = [[1, 3], 5, 7, 11]

  // valid values are the letters "a" and "z"
  validValues = ["a", "z"]

  // valid values are any string beginning with "a"
  validValues = [["a", "a"]]

  // valid values are any string 
  // beginning with a lowercase letter
  validValues = [["a", "z"]]

  //.The string "baa" is NOT valid here
validValues = [ "a", ["bbb", "i"]]

  //.The string "baa" IS valid here
  validValues = [ "a", ["b", "i"]]

Compatibility

Table 1. Support for validValues property
Data item JSF handler VGUI record Console UI Text Form Java™ Text Form COBOL Print Form Java Print Form COBOL
Yes Yes Yes Yes Yes Yes* No No

* The following additional compatibility considerations apply:

Table 2. Compatibility considerations for validValues
Platform Issue
COBOL generation Text forms only support numeric fields and a single pair of valid values.

Feedback