Runtime tools : Channels components : HTML Channel : Concepts : Validation
  
Validation
Data is validated every time a new HTML client request is received on the server with values to update the operation or process context. There are two types of validation: single data field validation and business function cross-field validation. In a field validation, the type's validator performs a syntactic validation to check whether the data is valid for the field. Once the toolkit has validated the data syntactically, it can then validate the data semantically. Semantic validation checks whether the data conforms to specified business rules. For example, a transfer has a due date and the due date can only be on a business day. The validator first checks (a syntax validation) that the due date field contains a valid date. If the date is valid, the cross-field validator then checks whether the due date is a business day (a semantic validation).
The typed data field definitions in the dsetype.xml file contain the required validation rules for single data field syntactic validation. The field validation process goes through the keyedCollection, finds the data element in the context with the same name as the data element in the file, validates the data element (syntactically through the data field validator and semantically through the operation cross-field validator), and, if validation is successful, updates the context. All the exceptions received for each field during validation are added to a Hashtable object kept in the errorInfo attribute of the data element. This attribute is later used by the JSP to show any error related to a field. See Performing validation.
If you are using an HTML flow processor's transition with context, the processor's context is updated only if the validation is successful (see Transition contexts).
After performing single data field validation (both syntactic and semantic), the toolkit performs a cross-field validation of the relationship between the current field's value and the value of another field. An example of a relationship validation is when an address cross-field validator checks that a zip code is valid for the state identified in another field. See Performing cross-field validation.
Although a semantic validation is a field validation, the cross-field validator is the object that performs this check. This is because semantic validation and cross-field validation require a context. The cross-field validation requires a context because it uses more than one field to validate the data. The semantic validation requires the context because the meaning of the field may vary depending on the field's status inside the context.
See
Transition contexts
Dynamic transition contexts
Go up to
Concepts