4 Data Type Definition

All the out of box available data types will be listed in ‘DIGX_FW_LOCALE_DATA_TYPE' table for default locale ('en').

If the data type needs to be redefined for a different locale (e.g. if pattern is required to be changed for different locale for a data type), a specific entry needs to be inserted for that data type for required data type.

If the validation pattern for a particular field is asked for a locale other than 'en' and corresponding entry is available in DIGX_FW_LOCALE_DATA_TYPE table the same will be applied. Otherwise by default validation pattern of 'en' will be used.

Perform following steps, if new data type is to be introduced for the taxonomy validation.

  1. Make an entry in ' DIGX_FW_LOCALE_DATA_TYPE' for default locale ('en').
  2. Define the validation definition using the columns available in the table (like minlength, maxlength, pattern etc).
  3. Provide required error codes and their corresponding entries in 'DIGX_FW_ERROR_MESSAGES'.
  4. Create a taxonomy validation class for the data type and provide its fully qualified name in the respective column.
  5. The out of the box taxonomy validation class should reside in 'projects\framework\com.ofss.digx.appcore.dto\src\com\ofss\digx\app\dto\validator\taxonomy' .
  6. Each taxonomy validation class must implement 'com.ofss.digx.app.dto.validator.ITaxonomyValidator'. Use the overridden 'validate' method to provide logic for validation. It should be defined as singleton class and provide a ‘getInstance’ method for its loading. (Refer Templates section for reference).
  7. Also each taxonomy validation class must implement the ‘getCategory’ method. The validator category can be ‘NUMBER’, ‘TEXT’, ‘DATE’ or ‘OTHER’.