In this Oracle APEX Tutorial, We are going to see 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
- The mobile number must have value.
- The mobile number should be 10 digits only.
- The Mobile number not less than and greater than 10 digits
- 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.
- Item Not Null
- SQL Expression
- 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.
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.
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.
Add error message which you want to display. The Following screenshot will help you for the better understanding.
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.
0 Comments
If you have any doubts, Please let me know