Hi, Questetra users! I’ m HATANAKA, Questetra CTO.

We have been improving the web application form App, but the application form only conducts the mandatory check whether “E-mail address/Phone number has been entered”.

Phone Number Verification through Web Form Application

Although it is a mechanism in which an application is not completed if entered email address or phone number was wrong eventually, “obviously wrong” entries should be repelled on the first stage.

Thus, I will revise the setting on Data Items of Email address and Phone number. I’m going to add a checking with “Regular expression”. Here is a table of what I have changed. I omit other items since there is no change in them.

M206: Mandatory Check and Input Format Check on Each Data Item

Data Item Type Required Permission at Start Event (Form) Permission at Receive Task (Form) Permission at Human Task
Email address String type single line Yes Editable Only display Only display
Regular expression to be satisfied: [-!#-'*+/-9=?A-Z^-~]+(?:\.[-!#-'*+/-9=?A-Z^-~]+)*@[-!#-'*+/-9=?A-Z^-~]+(?:\.[-!#-'*+/-9=?A-Z^-~]+)*
Phone number String type single line Yes Editable Only display Only display
Regular expression to be satisfied: \+81\d{9,10}

Since the regular expression is simpler, I explain regarding “Phone number”, first. It is a premise that it corresponds only to telephone numbers in Japan.

According to the Ministry of Internal Affairs and Communications (MIC) of Japan, phone numbers in Japan are classified into 6 categories as the following.

  • [Numbers starting with 00] Used when making phone calls using a relaying telephone company to or making international calls.
  • [Number starting with 0A0 (A is other than 0)] Used to call a mobile phone, PHS, pager, IP phone, etc.
  • [Numbers starting with 0AB0 (A and B are other than 0)] Use this when using advanced telephone service provided by the telephone company.
  • [Numbers starting with 0ABC (A, B, C are other than 0)] Used to call a landline. (Long distance calls)
  • [Numbers starting with 1] Used for important and supplementary services in the aspects of urgency, commonality, and safety.
  • [Numbers starting with 2 to 9] Used when calling a landline phone. (Local call)

Of these, the following two are what is supposed I should deal with.

  • [Number starting with 0A0 (A is other than 0)]
  • [Numbers starting with 0ABC (A, B, C are other than 0)]

Moreover, [Number starting with 0A0 (A is other than 0)] is defined as

  • 11-digits numbers starting with “070”, “080” or “090” are for mobile phones and PHS.
  • 11-digits numbers starting with “0204” are for pagers.

Even though there is no mention about IP phone on the website of the MIA, it is 11-digits starting with “050”.

A [Number starting with 0ABC (A, B, C is other than 0)] is a number of 10 digits in total which consists of

  • “0”
  • 5 digits of area code/local station number
  • 4 digits of subscriber number

(Excluding the leading “0”, 9 digits in total)

In addition to this, the telephone number must start from the country code since Twilio is a global service. Thus the regular expression will be “start with + 81″, and remaining 9 or 10 digits”, as shown below. “81” is the country code of Japan. According to the MIC, it is certain that the next to “81” is not “0”. However, it does not express that far.

\+81\d{9,10}

Next, I explain concerning email address. The specification of an email address (according to RFC) is extremely complicated and it is difficult to cover all patterns. In the past, there were cell phone carriers that allow issuance of RFC violating email addresses that are not in compliance with the specifications. They said nominally that it was a measure against spam emails.

Well, the manual on this site introduces the following.

R2060 Regular Expression

[a-zA-Z0-9][a-zA-Z0-9_\.\-+]*@[A-Za-z0-9\.\-]+

Here in this article, I will specify the following regular expression.

[-!#-'*+/-9=?A-Z^-~]+(?:\.[-!#-'*+/-9=?A-Z^-~]+)*@[-!#-'*+/-9=?A-Z^-~]+(?:\.[-!#-'*+/-9=?A-Z^-~]+)*

This is a regular expression that is actually being used inside Questetra BPM Suite, which excludes the following out from RFC 5322 Address Specification.

  • Comment
  • Space
  • Control character
  • IP address
  • Obsoleted format in RFC 2822
  • Format containing quote-string

It is different from the one introduced on the Support site for;

  • not to allow “period in the end”, “consecutive periods (dots)” at immediate before and after “@”.
  • the range of available symbols is wider.

I consider this will sufficient currently, and adopt it.

By these configurations of the regular expression, inputs of obviously not an email address or phone number can be avoided.

Furthermore, I would like to add Placeholder and Description.
Although the input check has been set, applicants do not know what kind of input check will be done.
Therefore, it is desirable to explain appropriately using Placeholder and Description.

Data Item Type Required Permission at Start Event (Form) Permission at Receive Task (Form) Permission at Human Task
Email address String type single line Yes Editable Only display Only display
Regular expression to be satisfied: [-!#-'*+/-9=?A-Z^-~]+(?:\.[-!#-'*+/-9=?A-Z^-~]+)*@[-!#-'*+/-9=?A-Z^-~]+(?:\.[-!#-'*+/-9=?A-Z^-~]+)*
Placeholder; support@questetra.com
Description;

Please enter only with single-byte alphanumeric/symbols
Phone number String type single line Yes Editable Only display Only display
Regular expression to be satisfied: \+81\d{9,10}
Placeholder; +8175205XXXX
Description;

Please start with the country code (+81).
Only numeric without a hyphen.

Utilizing of Placeholder is controversial.

The most negative opinion is, “Since it disappears, you should not mention important matters such as cautions”. It is indeed. Even if you use it, it will be more appropriate to keep it at the level of examples.

There is another negative opinion that “It can not be distinguished from the initial value of the form”. If it is easily recognized as an example, the possibility of being misunderstood as an initial value will be low. Even so, it is difficult to say what should be an example.

In this way, considering the controversiality of using Placeholders, “Not using at all” will be also one of the choices.

With the settings of Placeholder/Description, the application form will appear like the following figure.

In this article, I worked on adding of the input check on the phone number and the email address. I also set descriptions and Placeholders so that the contents of the input check will be understood by the applicant. That’s it, for today. See you around.