Wednesday, May 4, 2011

ADF BC : Validate Phone Number from Entity Object


I have seen one thing in ADF developer community that we don’t utilize power of ADF BC.

Let us try Phone Number Validation without writing any code.

Phone Number (xxx-yyy-zzzz) format.

I am expecting that you have HR schema available and you have already created Employee Entity and View Object.

Double click Phone number in Employee Entity Object and go to validation and select regular expression.

Select Phone Number and Click Use Pattern which will generate Phone number regular expression pattern.


Go to Failure Handling and give your custom message.


Now run the application , we all know it should only accept xxx-yyyy-zzzz pattern.

Let us try and it will throw following exception when we tab out to another field.



That is really woow way of handling exceptions. You can find regular expression for Zip Code , Fax Number and other stuff that you will need for validation.

No comments:

Post a Comment