Edits Property Validation Options

Validations/edit checks are available to test if data meets a certain criteria (e.g., the data entered is numeric). A validation property is available for each prompt (i.e. TextBox or Memo controls that accept data entries) and validations are entered in the Properties window of graphical control. Multiple validations/edits are allowed.  Select the Edits property, and select the drop down arrow.  A multiple line input box will display.  Enter one edit per line.  Note that as soon as an entry passes an edit, any subsequent edits are ignored.

If an entry has no validation criteria, leave its edit property blank.

Text (Character String) Validation

This will test for an exact match between the data entered and the text edits required. A text edit may be entered either with or without quotes.

Format is:

'string' (in single quotes)

'CA' means the user must enter CA to pass this edit test

Pattern Match Validation

This will test the data entered to see if it matches the pattern specified. Format is:

xA or xN

For example, 2A means that the data entered must have the format 'AA' (i.e., match 2 alphabetic characters, for example: 'OR'). 4N means the data entered must be in the form 'NNNN' (i.e., 4 numbers; for example: '1234').

4N means the user must enter a valid 4-digit number.

Pattern Not Allowed Validation

This will test the data entered to assure that it does not match the pattern specified. Format is:

#PATTERN

>#4N means the user may enter anything but 4 numbers (i.e., not 4 numeric characters)

#Hello means the user may not enter Hello in the prompt.

Alpha Only Validation

This will test the data entered to assure that it only contains alpha characters (A-Z and a-z). Note: no spaces are allowed.

Format is:

ALPHA

Numeric Only Validation

This will test the data entered to assure that it only contains numeric characters (0-­9), and the special characters '.' (period), '+' (plus), and '-' (dash). Note: no spaces are allowed.

Format is:

NUM

Integer Only Validation

This will test the data entered to assure that it only contains an integer number (no decimal). Note: no spaces are allowed.

Format is:

INT

Greater Than Validation

This will test the data entered to see if it is greater than a specified value.

Format is:

>number or >=number

>99 means that the user must enter a number greater than 99.

Less Than Validation

This will test the data entered to see if it is less than a specified value.

Format is:

><number or <=number

<99 means that the user must enter a number less than 99

Not Equal To Validation

This will test the data entered to assure that it does not equal a specified value. This is a string comparison only.

Format is:

#’stringvalue’

>#’99’ means that the user must enter a string that does not equal ‘99’. Since prompts accept data as strings by default this validation would work with numbers while treating them like strings.

Data Range Validation

This will test the data entered to see if it is within a specified range. This is a numeric comparison only.

Format is:

RG/exp1,exp2

Where:

exp1 = starting number for range.

exp2 = ending number for range.

RG/1,100 means that the user must enter a number between 1 and 100, inclusive

Date Validation

This will test the data entered to see if it is a proper date.

Format is:

DATE

Entering MMDDYY, MMDDYYYY, MM-DD-YY, MM/DD/YY among others are all valid entries.

Index Validation

This will test the data entered to see if it can be found within the edit string.

Format is:

I:string

I:YN means data must be either 'Y' or 'N', or ‘YN’.

Contains String Validation

This will test the data entered to see if it contains the specified edit string.

Format is:

C:string

>C:abc means data entered must contain the characters 'abc' somewhere within it

Not Condition Validation

This will test the data entered to see if it does not match a given condition.

Format is:

NC,exp1,exp2,exp3

Conditional Operators (exp1,exp2,exp3) are:

exp1 = the parameter to be compared to exp3. This can be a literal (in quotes, even if numeric, eg ‘3’), a prompt number, or the RSP variable.

exp2 = a conditional operator from 1 of the following:
=       for an equal to comparison
#       for a not equal to comparison
>       for greater than
<       for less than
M      for a matches comparison
nM     for a not matches test
I:       exp3 exists in exp1 (same as NC)
C:      exp1 exists in exp3

NC:    exp3 exists in exp1

exp3 = the second parameter to be compared to exp1. This parameter can be a literal or an edit such as NUM and ALPHA.

NC,2,=,’100260’

This checks prompt 2 to see if it is equal to the string value 100620. If it is NOT, the edit is satisfied.

NC,’XYZ’,#,ALPHA

This compares if the string literal XYZ is not an ALPHA string. Because XYZ IS an alpha, this edit is satisfied.

>NC,'3',C,'12345'

This edit is NOT satisfied because the first parameter (3) is contained within the third parameter (12345).

Branch/Goto Validation

>Technically, this is not a validation. Allows the display to Goto a 'downstream' prompt, based upon the data 'RSP' entered.

Format is:

@GOTO,prompt#(,conditions)

@GOTO,5,RSP,=,”99” means to go to prompt 5 if the response at the current prompt equals “99”. See the @SKIP default parameters for examples of 'conditions'

Strip (Data Entry) Validations

>Validates that 'str' is there, then strips data 'str' from the entry.

Format is:

@STRIP,P,str to strip data prefix 'str' if it occurs

@STRIP,S,str to strip data suffix 'str' if it occurs

@STRIP,C,str to strip the first occurrence of the data 'str' if it is contained in the data.

@Strip,P,NBR: means to strip the character string 'NBR:' if it prefixes the data.