You are here: Features > Cells > Creating A Validation Rule

Creating A Validation Rule

To set up a validation for a cell, you need to select the type of validation to be performed and then either provide a value or a pattern that will be tested against. The types of validation available will change depending on the type of cell that is selected.

Constructing a Validation Pattern

A validation pattern is used to define the format that inputs to a cell will be tested against. Only inputs that match the pattern specified in the string are considered valid. The following characters can be used to construct a validation pattern:

Character Description
A Alphabetical character (A to Z and a to z)
C Alphanumeric character (A to Z, a to z and 0 to 9)
N Numeric character (0 to 9)
* Character matches the previous character type
Hyphen Character must be a hyphen
Space Character must be a space
Custom list These values can be provided as a comma-separated list (C1,C2,C3) to match values defined in other CaseView cells. Complex calculations are not supported for validation.
Boolean The values "Yes" and "No" can be defined as string constants to produce a boolean match.

Numeric Cells

Numeric cells have the following validation types available:

Validation Type Description
< Matches values that are less than the provided validation value.
<= Matches values that are less than or equal to the provided validation value.
> Matches values that are greater than the provided validation value.
>= Matches values that are greater than or equal to the provided validation value.
Value Not Equal Matches values that are not equal to the provided value.
Value Between Matches values that are between the provided values.

Once you have chosen the type of validation to perform on a numeric cell, you must provide a value to match against. Click the button in the cell next to the validation type and use the calculation editor to provide a value. This can be a static value, or one that is calculated using the formula that you build in the calculation editor.

Alphanumeric Cells

Alphanumeric cells can be set to Value Not Empty to ensure that a value is provided, or they can also be set to Match Format to validate input against a provided pattern. You can create a custom pattern to use for validation or use one of the pre-defined patterns from the table below:

Menu Selection Validation Pattern Description Default Message
Postal Code ANA NAN Canadian postal code Input must be a Postal Code
Zip Code USA *NNNNN U.S. zip code Input is not a valid Zip code
Zip Code + 4 USA *N-NNNN Predefined U.S. +4 zip code Input is not a valid Zip code
Zip Code No *N U.S. zip code short form Input is not a valid Zip code
Zip Code No, - *N-*N U.S. zip code short form Input is not a valid Zip code
Zip Code Gen *N or *N-*N Zip Code format for versions of Working Papers lower than 2011 Input is not valid Zip code
Phone No CAN *N-NNN-NNNN Canadian phone number Input is not a valid phone number
Phone No USA (*N) NNN-NNNN U.S. phone number Input is not a valid phone number
Phone No Gen *N-*N-*N Phone number format for versions of Working Papers lower than 2011 Input is not a valid phone number
Phone No Intl + *N *N *N *N Phone number  
SIN CAN *N NNN NNN Canadian Social Insurance Number Input is not a valid social insurance number
SIN USA *N-NN-NNNN U.S. Social Security Number Input is not a valid social insurance number
X or "" X or Space Alphanumeric input format for versions of Working Papers lower than 2011 Only X and " " are valid inputs for this cell
Y, N or "" Y, N or Space Alphanumeric input format for versions of Working Papers lower than 2011 Only Y, N and " " are valid inputs for this cell
Specific List Comma-separated list of values User defined, values separated by commas Click images\calctool_shg.gif on the right side of the field to create a custom message. This message must be enclosed in quotation marks
Custom format Custom user-defined pattern User defined, values separated by commas Click images\calctool_shg.gif on the right side of the field to create a custom message. This message must be enclosed in quotation marks

 

Date Cells

Date cells can be validated in a similar way to numeric cells, except that the value being matched against is a date, rather than a number. Dates are specified using the format DMY(1,1,2012) where the first number in the brackets represents the day, the second represents the month and the final number represents the year.

Validation Type Description
< Matches dates after the date inputted into the cell.
<= Matches dates after or the same as the date inputted into the cell.
> Matches dates before the date inputted into the cell.
>= Matches dates before or the same as the date inputted into the cell.
Value Not Equal Matches dates that are not equal to the provided value.
Value Between Matches dates that are between the provided values.
Value Not Empty Matches any input to the cell.

 

Calendar Control

If the Calendar Control check box is selected, the cell will allow the user to select a date from a drop-down calendar to capture the input rather than typing a date into the cell. The Calendar Control also allows for immediate validation of date cells.

 

Related Topics