Questionnaire - Constraint Examples


Regular expressions

The regular expression examples provided in the wizard verify that the input string contains the pattern.

To make sure the input does not contain other information, add ^ at the begining and $ at the end of the regular expression.

Expected format Examples Corresponding regular expression
European phone number, with or without extra information

+(33)1.55.85.91.17 (office)

+(33)7.00.01.02.03 (mobile)

(\+\([0-9]{1,3}\)|[0-9])[0-9][-.]([0-9]{2})[-.]([0-9]{2})[-.]([0-9]{2})[-.]([0-9]{2})
One European phone number, without any other information

+(33)1.55.85.91.17

01.55.56.57.17

^(\+\([0-9]{1,3}\)|[0-9])[0-9][-.]([0-9]{2})[-.]([0-9]{2})[-.]([0-9]{2})[-.]([0-9]{2})$
One USA phone number, without any other information

+(33)1.55.85.91.17

01.55.56.57.17

^(\([0-9]{3}\) |[0-9]{3}-)[0-9]{3}-[0-9]{4}$
One email, without any other information employeename@company.com ^.+@[^\.].*\.[a-z]{2,}$
String limited to 15 characters abc123 @ & xyz ^.{1,15}$

Note: It is not advisable to apply this type of constraint on memo questions, where HTML code may be added when the text is formatted. When the constraint is being checked, the whole character string will be considered (the text entered as well as the HTML code).

Example documentation icon EN.png   If a user enters A bold text in a memo question, the character string considered is <strong>A bold text</strong> and the size of the string is 28 characters, not 11

Tags:
Last modified by Unknown User on 2017/03/07 11:36
Created by Administrator XWiki on 2016/04/11 12:12

Shortcuts

Recent Updates

Haven't been here in a while? Here's what changed recently:

-   Product name - ev itsm.png
-   Product name - ev sas.png

Interesting Content

How to Automate Integration
Add a Shortcut to an App
History
Quick Dashboard
Full text search - Stop Words

Powered by XWiki ©, EasyVista 2018