Space TimelineSpace Timeline

Appendix of Examples Validations

Common Validation Sets

 



  • Validation set: Optional=Yes - Set on Transition Validation (Open) (Save)

  • Validation set: Optional=Blank – Set on Transition Validation (Print and Submit) (Sign)



 

Types of Validations Supported

 

Common syntax to validate pdf form fields

  • If form: Name = ‘form name’

  • If form: (SQL expression)

Also, there is a utility package VALID to simplify some checks on multiple fields. This package contains three functions: 

  • VALID .IN_LIST

  • VALID .IS_SEQ

  • VALID .IS_UNIQ

A SQL expression is any expression supported by ORACLE. It can use a reference to a form field as syntax:

Expression

Result

Expression

Result

${fieldName} 

will return null is no such field or no value assigned

${fieldName AS DATE} 

will return null if value is not a date

${fieldName AS NUMBER}

will return null if value is not a number

${OLD.fieldName} 

will return OLD value of field (makes sense on Save only)

 

Sample Expressions

Validation Type

Description

Example

Validation Type

Description

Example

IS NULL

Checks if a field is empty.

If form: ${field name} IS NULL

valid.in_list

checks if values of field1..N are in allowed list – ‘1,2,3’

allowed list can contain the word NULL, so all fields can be null, otherwise at least one field must have allowed value

If form: valid.in_list('1,2,3', ${field1}, ${field2}, ...${fieldN})

valid.is_seq

checks if values of field1..N are sequential and unique: i.e 1,2,3,…

(fields order does not matter)

If form: valid.in_seq(${field1}, ${field2},...{fieldN})

valid.is_uniq

checks if values of field1..N are unique

If form: valid.in_uniq(${field1}, ${field2}, …${fieldN})

REGEXP_LIKE



If form: NOT REGEXP_LIKE(${1ben.H.FullAddr}, '^\s*\w+.*,\s*\w+.*,\s*[a-zA-Z]{2,}\s+\d{5}(-?\d{4})?\s*$')

AND/OR/NOT, (), etc.

Boolean expressions

If form: ${1own.H.State} not in ('MA', 'NH', 'MI', 'MO') and ${1own.GOV.IDIssueDate} is null or not REGEXP_LIKE(${1own.GOV.IDIssueDate}, '^\d{1,2}/\d{1,2}/\d{4}$')

Old vs new value

Validates against old value and new value

If form: ${OLD:1acc.RegTypeEntity} <> NVL(${1acc.RegTypeEntity}, ' ')

NVL



If form: ${OLD:1acc.RegTypeEntity} <> NVL(${1acc.RegTypeEntity}, ' ')

Database validations



If form: ${PARAM.REGTYPE.ID} IN (select lc114_code from lc114 where lc114_r100601 like '%IRA%') AND ${PARAM.ACCTOPTION.ID} LIKE '%,%'

 

Additional Sample Expressions 

FORMAT REASON

EXAMPLE EXPRESSION

FORMAT REASON

EXAMPLE EXPRESSION

Alpha Character (Name)

If form: ${FIELDNAME} is null or not regexp_like(${FIELDNAME},'^[a-zA-Z,.& ''/-]+$')

Alphanumeric character (Letters and Numbers)

If form: ${FIELDNAME} is null or not REGEXP_LIKE(${FIELDNAME},'^[0-9a-zA-Z,.& ''/-]+$')

Alphanumeric Character (Letters and Numbers Only)

If form: ${FIELDNAME} is null or not REGEXP_LIKE(${FIELDNAME},'^[0-9a-zA-Z ]+$')

Social Security Number/ Tax Payer ID

If form: ${FIELDNAME} is null or not regexp_like(${FIELDNAME},'^(\d{3}-\d{2}-\d{4}|\d{2}-\d{7}|\d{9})$')

Date of Birth

If form: ${FIELDNAME AS DATE} is null or not regexp_like(${FIELDNAME},'^(\d{2}/\d{2}/\d{4}|\d{2}-\d{2}-\d{4}|\d{2} \d{2} \d{4})$') or (${FIELDNAME AS DATE} > trunc(SYSDATE))

Address – Not Allowing Post Office Box

If form: ${FIELDNAME} is null or regexp_like(${FIELDNAME},'(^\s*p ?o ?b\s*|[^a-z]pob[^a-z]|p\.o\. ?b*|po ?box|post\s*office\s*box)', 'i')

Zip Code

If form: ${FIELDNAME} is null or not regexp_like(${FIELDNAME},'^(\d{5}|\d{9})?$')

Phone #

If form: ${FIELDNAME} is null or not regexp_like(${FIELDNAME},'^(\(\d{3}\) ?\d{3}-\d{4}|\d{3}[ -]?\d{3}[ -]?\d{4})$')

Email Address

If form: ${FIELDNAME} is null or not regexp_like(${FIELDNAME}, '^[A-Za-z0-9._-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}$')

Percentage (%) Figure

If form: ${FIELDNAME} is null or not regexp_like(${FIELDNAME},'^\d+(,\d{3})*(\.\d{1,2})?\%?$')

Dollar ($) Figure

If form: ${FIELDNAME} is null or not regexp_like(${FIELDNAME},'^\$?\d+(,\d{3})*(\.\d{2})?$')