Ticker

6/recent/ticker-posts

Mobile Number Format Validation in Oracle APEX - Javainhand Tutorial

In this Oracle APEX Tutorial, We are going to see mobile number format validation in Oracle APEX.

Mobile Number Format Validation in Oracle APEX

Mobile Number is important field at the time of the registration but validating a mobile number also crucial aspects at the time of filling the form so that  we can save good data to the database.

In this Section, you'll be going to learn how to do mobile number format validation in Oracle APEX before it's save to the database.

We will add following Mobile Number Validation

  1. The mobile number must have value.
  2. The mobile number should be 10 digits only.
  3. The Mobile number not less than and greater than 10 digits
  4. The Mobile number contains the first digit should be 6 to 9.

In this Mobile Number Format Validation, We will cover following Oracle APEX validation types.

  1. Item Not Null 
  2. SQL Expression
  3. Item Match Regular Expression

Step 1:- Create a mobile number page item and that item will be number field. The Following screenshot will help you for the better understanding.

Mobile Number Format Validation in Oracle Apex

Step 2:- After the creating the page item, Now Right click on that page item and create a validation then select (item is not null) validation type. The Following screenshot will help you for the better understanding.

Step 3:- After adding the first validation rule, Now we will add second validation  Mobile Number Should be 10 digits only. For adding this validation rule , Go to page item property and find the validation section.There is a maximum length option fill with the 10. The Following screenshot will help you for the better understanding.

Mobile Number Format Validation in Oracle Apex

Step 4:- After adding the second validation rule, Now we will add third validation mobile not less than and greater than 10 digits.  For this We will add one more validation on mobile number page item and choose SQL Expression Type Validation. Use below code to the SQL Expression section and Add error message. The Following screenshot will help you for the better understanding.

Length(:P3_MOBILE_NUMBER)=10

Step 5:- After adding the third validation rule, Now we will add forth validation Mobile Number first digit should contain between 6 to 9. For this, We will add one more validation on mobile number page item.

Identification: -Mobile Number  First Contain 6 to 9
Validation:- Type>Item Match Regular Expression.
Item:- P3_MOBILE_NUMBER
Regular Expression:- ^[6789]\d{9}$

Mobile Number Format Validation in Oracle Apex

Add error message which you want to display. The Following screenshot will help you for the better understanding.

Mobile Number Format Validation in Oracle Apex

That's all for today, I hope you like my (Mobile Number Format Validation in Oracle APEX) blog post. If you liked this post then comment in the comment box section.

You can also subscribe to our youtube channel where we also post videos of Oracle APEX.

If you are facing any problem while adding the validation rule, We have already uploaded a video on Mobile Number Format Validation in Oracle APEX to our youtube channel.

Click to Watch

Post a Comment

0 Comments