INTRODUCTION:

Phone number validation is a common requirement for ensuring that users provide valid and correctly formatted phone numbers. Proper phone number validation is essential to prevent incorrect or invalid data from being stored in your application’s database and to provide a better user experience.  Using a plugin, we can add phone number validation in OutSystems.

TECHNOLOGY AND TOOLS USED:

The following tools has been used to implement this phone number validation.

  1. Outsystems-Service Studio.
  2. Plugin – TEXT.
  3. Logical Flow.

CREATING AN ENTITY:

We create a entity in Data tab by right Click Add Entity.

 

  • Created a Entity name called Employee.Add Attributes called Name and Phone number.

 ADDING PLUGIN:

  • You may able to see PLUG shape plugin at the top left above the toolbar at left. It is called as MANAGE DEPENDENCIES .
  • On clicking that we can able to see all the public elements we can use in the module.

  • There in the search module search for text and select all the text extensionsand click on Apply button.

  • On Double clickingthe Save button on the Form page we can able to see the Work Flow of the applications.
  • At the Right side you can able to see the Logic tab and there text extensions will be available. On expanding that Extension we can able to see lot of PLUGIN will be there.

  • Here in that we are going to use Regex_Search
  • Drag and Drop that Regex_Search into the Work Flow .

  • At Right side bottom for Regex_Search it will show required field to fill the properties of that Regex_Search.
  • In the Text property fill the value which shows in suggestion.

  • And also need to fill the  pattern “^((\+)?(\d{2}[-]))?(\d{10}){1}?$” .

  • In the Process Flow drop the If condition and mark it value to be Foundshows in the suggestion at the right side property.

After that drop the assignment operator from the tool bar and assign the value at the right side bottom properties .

  • There in the Assignment we have to assign the value and expression for that
  • For first value we have to select variable by clicking the widget –> Form1–> Input_PhoneNumber under that select.

  • For expression select Falsefor this.
  • For second  value we have to select variable by clicking the widget           Form1 Input_PhoneNumber under that selectValidation Message.

  • For expression write a Error text as “Enter a Valid Number”.

  • End the assignment operator using
  • Swap the connectors FALSEfor Assign side ,and for TRUE side drop one Message and add a success message like ”VALID”.

PUBLISHING APPLICATION:

  • PUBLISHyour application.

  • Your Application will open on the Browser.
  • Createa new entry.

  • Create a entry without giving a phone number it will throw Error –> Enter Valid number

  • Create a entry with number more than or less than 10 digits.It will throw error.

  • Create a entry with including character in it. It will trow error.

  • Create a entry with a Correct Value .It will validate and show valid success message.

CONCLUSION:

Using a phone number validation plugin in OutSystems can greatly enhance the reliability and user experience of applications that rely on phone numbers for communication and authentication purposes.

Plugins in OutSystems extend the platform’s capabilities, reduce development time, and enhance the overall functionality and user experience of your applications.

 

 

 

Recent Posts

Start typing and press Enter to search