Validation Rules Exercise v5.1

   PlatformApplicable to all products in Temenos Journey Manager.  |   Form Builder |  All versions   This feature is related to v5.1 and higher.

This exercise will allow you to practice your skills for creating validation rules. During this exercise you will create a new form and add components. You will then create rules on the added components.

Do your best to follow the information provided and complete each step.

If you get stuck, you can always re-watch any of the online training modules. This is a good way to refresh your form building skills. You’ll also find Extra Help at the end of this exercise, which contains additional information to help you complete the exercise. 

You can find a sample of the completed exercise form in the Maestro Exercise Project: Maestro Training Exercises v5.1 > Validation Rules Finish. If you have not already imported the Maestro Exercise Project please visit Exercise Setup - Importing the Maestro Exercise Files for more information.

Step 1 Open Validation Rules Begin

  1. Expand the Organization.
  2. Expand the Project.
  3. Select Forms.
  4. Double-click Validation Rules Begin.
  5. Click Edit Version to open the form.

Step 2 Create a Valid If Rule

Use the Valid If rule for the Customer Number. Create a rule where the Customer Number is valid if greater than 10000.

Note

Customer Number contains a visibility rule. You won’t see this field in preview until you select Yes for the question ‘Are you an existing customer?’

Step 3 Create a Regular Expression Validation Rule

You can search the Regular Expression Library (http://regexlib.com) to locate predefined expressions to use in your Maestro form.

Setup a Regular Expression rule to validate the Social Security Number component. An example expression is included in the image below.

Example Regular expression: ^(?!219-09-9999|078-05-1120)(?!666|000|9\d{2})\d{3}-(?!00)\d{2}-(?!0{4})\d{4}$

Example Match Fails message: Please enter a number using this format ###-##-####

Once the validation rule is created, click Save and Preview the form.

Try entering this number first: 123-4-5678

Then try this number: 123-45-6789

Extra Help

Need some extra help?

Use the information below to assist you in completing the exercise steps. 

Create a Valid if rule

  1. Select the component to contain the validation rule.
  2. Click Create Rule then select Valid if.
  3. Type if (.
  4. Double-click the (Customer Number) component to add data.customerNumber to the script window.
  5. Type < 10000) then press Enter.
  6. Type return "Please enter a valid Customer Number.";.
  7. Click Save.

Create a Regular Expression rule

  1. Launch the Regular Expression Library - http://regexlib.com
  2. Locate the pre-defined expression you want to use.
  3. Copy the expression, then return to the Maestro form.
  4. Select the component to contain the validation rule.
  5. Click Create Rule then select Regular Expression.
  6. Paste the pre-defined expression in the Must Match this expression box.
  7. Enter an appropriate failure message.
  8. Click Save.