Email Validation

Navigation:  Knowledge Base > Page Editor > General Attributes > Regular Expression >

Email Validation

Previous pageReturn to chapter overviewNext page

User can validate email entered in the Input field using Regular expression regex. To know more follow the steps below.

 

Step 1: Open a Free Layout Page.

a. Drag a TextField  UI part and drop it on the Page.

 Name/Identifier property : "email "

b. Drag a Label UI part and drop it on the Page.

 Name/Identifier property : "emailregex "

 Display Text: "emailregex "

a.Drag a RoundButton UI part and drop it on the Page.

b.Browse to the "Functions" section on "Properties Palette window" of RoundButton for applying actions.

c.Click on the corresponding Edit(0) button of the Function on which user wants to apply the Action. To know more about the Functions click here.

 

 

mobilous_appexe_myproject_generalattribute_regularexpression_page     mobilous_appexe_npe_myproject_Actions_roundbutton_edit

 

Step 2: Click on the "Main Value" and then click on “Set the Main Value” action.

Edit Action Parameters:

 

Parameter

Description

Value

User need to enter the regular expression for Email Validation:

 

@@REGEXP_LIKE('[email]','regex(^[_A-Za-z0-9-\+]+(\.[_A-Za-z0-9-]+)*@[A-Za-z0-9-]+(\.[A-Za-z0-9]+)*(\.[A-Za-z]{2,})$)')

 

Page Name

Select Page name where the target UI part exists.

Target UI Part

Target UI Part is the UI part where the user wants to set the value.

 

mobilous_appexe_myproject_generalattribute_regularexpression_setmainvalue

 

Step 3: On "Success" event of "Set the Main Value" , Apply "Alert" action in "Warning Control" category.

Edit Action Parameters:

 

Parameter

Description

Style

Select style as Default.

 

Title

Enter Alert Title.

Message

Enter message as "Email is Invalid".

Cancel Title

Enter "Cancel" title

 

 

mobilous_appexe_myproject_generalattribute_regularexpression_successAlert

 

Step 4: Click on " + " button on left of Alert action to add condition.

 

mobilous_appexe_myproject_generalattribute_regularexpression_Applycondition1

 

Step 5: Add Condition as " emailregex != true  "  in Condition Editor as shown below.

 

mobilous_appexe_myproject_generalattribute_regularexpression_Applycondition2

 

Step 5: On " else "  option apply "Alert" action in "Warning Control" category.

Edit Action Parameters:

 

Parameter

Description

Style

Select style as Default.

 

Title

Enter Alert Title.

Message

Enter message as "Email is Valid".

Cancel Title

Enter "Cancel" title

 

 

mobilous_appexe_myproject_generalattribute_regularexpression_elseAlert

 

Step 6: Action is applied as following.

 

mobilous_appexe_myproject_generalattribute_regularexpression_Actionsapplied

 

Step 7: Preview the page:

Enter wrong Email, Click on "Validate Email" button.

Observe the Alert as "Email is Invalid".

 

mobilous_appexe_myproject_generalattribute_regularexpression_preview1   mobilous_appexe_myproject_generalattribute_regularexpression_preview2

 

 

Enter wrong Email, Click on "Validate Email" button.

Observe the Alert as "Email is Valid".

 

 

mobilous_appexe_myproject_generalattribute_regularexpression_preview3     mobilous_appexe_myproject_generalattribute_regularexpression_preview4