Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 4 Advanced Tasks : Validating Commonly Used Primitive Types

Validating Commonly Used Primitive Types
Primitive types can be validated by using pattern restrictions in a business object model and associated forms.
Task
Validate commonly-used primitive types by using pattern restrictions in the business object model.
Sample Project
To view the sample for this task, import the advanced sample projects as described in Import the Forms Advanced Samples. The sample forms and business object model for the task described in this section are contained in the forms.samples.bom sample project.
The form for this task (CapturePersonalDetails.form) is at the following location:
   forms.samples.bom/Forms/BOMHowTo/BOMHowToProcess/
      CapturePersonalDetails/
The business object model (FormsSamplesBOM.bom) is at the following location:
   forms.samples.bom/Business Objects/
You can double-click the form and business object model filenames (as well as those of other project resources) in the Project Explorer to open them in the editor. There, you can examine their contents and use them as models for your own projects.
Explanation
The business object model in the forms.sample.bom project models a PatternConstraints class, which makes use of the primitive types E-Mail Address, Post Code, ZIP Code, Social Security Number, Social Insurance Number, National Insurance Number, NA Telephone Number, and UK Telephone Number. Each of these primitive Text extension types has a pattern restriction that is automatically used to perform client-side validation of form entries. See the additional descriptions under Properties > <bom-primitive-type> > Description:
The Capture Personal Details form shows a Person, his or her personal details and preferences. Observe how the patterns modelled in the business object model are applied to user-specified form data.
 

Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved