How to create an item Phone Number of US Format

Hi,
Need to create an item in a page Phone Number.
The Item should accept only US Phone Number Format.
Need Suggestions.
Regards,
Krishna

Hi Krishna,
You can make the US Phone format validation in the Page controller by making a validation function and call this validation function on the submit button or form submission. u can use the following function in the page controller-
public void validatePhone(String sPhoneNumber )
Pattern pattern = Pattern.compile("\\d{3}-\\d{3}-\\d{4}");
Matcher matcher = pattern.matcher(sPhoneNumber);
if (matcher.matches()) {
throw new OAException("Phone Number Valid", OAException.INFORMATION);
else
throw new OAException("Phone Number must be in the form XXX-XXX-XXXX", OAException.INFORMATION);
and call the validation function in processFormRequest function
public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
super.processFormRequest(pageContext, webBean);
OAMessageTextInputBean msgInBean =(OAMessageTextInputBean)webBean.findIndexedChildRecursive("<id of the element>");
if ((pageContext.getParameter("<submit button>") != null))
String val =(String)msgInBean.getValue(pageContext);
validatePhone(val);
u also have the following imports in the controller -
import oracle.apps.fnd.framework.OAException;
import oracle.apps.fnd.framework.webui.beans.message.OAMessageTextInputBean;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
I hope this will help u.
Regards
Renu

Similar Messages

  • HT5622 My husband and I share the same apple id for our iphones, how do we change the phone number associated with our apple id to his phone number? He is getting my messages because the ipod has my number in it not his?

    My husband and I have iphones that use the ame apple ID, but different numbers and email addresses, how do we change the phone number that is associated with his ipod to his phone number?

    Use his ID for Settings>Messages>Send And Recieve and for Settings>FaceTime.
    If he does not have an ID then
    Create a NEW account using these instructions. Make sure you follow the instructions. Many do not and if you do not you will not get the None option. You must use an email address that you have not used with Apple before.
    Creating an iTunes Store, App Store, iBookstore, and Mac App Store account without a credit card

  • HT3965 how do i change the phone number for imessages?

    how do i change the phone number for imessages?
    i have set up an iTouch for my 10 year old son. To set up iMessaging between him and his parents i used my iTunes account but this picked up my phone number..........i now need to change this but cannot see how to do it in Settings. Any suggestions?

    Thanks, but i guess this means i have to create an email address for my son and hs own apple id?
    My aim is to link his mobile number to the iTouch but not to give him his own iTunes account....

  • How do I change the phone number associated with messages on my Mac?

    My computer is posting messges meant for my wife. How do I delete her phone number from my iMac Messages?

    Hi,
    Remove the Apple ID from any iPhone you don't want it linked to.
    On the Mac go to the Messages app and Sign Out of the Apple ID in iMessages account.
    Quit the App.
    Now open a Finder window
    In the Go Menu use the ALT key at the same time and select the Library that appears.
    In here navigate to the Preferences folder.
    Delete the com.apple.ids.service.com.apple.madrid.plist file (Drag to Trash).
    This will delete all Aliases and Alternatives in the iMessages account.
    Re-open Messages and Add the Apple ID you want to use.
    Now Add the Apple ID to any iPhone you do want to use it with.
    Restart Messages on the Mac and when the pop ups appear to say what the iPhone is using Accept the option.
    If any iPhone number appears  in a pop up that you do not want to use then Deny the pop up.
    (it will still add the Apple ID or phone number to the Alternative/Aliases list and the Start Conversation From drop down but they will not be active).
    Basically once any two iPhone number become linked via iMessages it is very difficult to remove this link.
    An Additional iPhone number on your iPhone as an alternative cannot be removed.
    Only deleting the .plist will remove it (at that point in time) on the Mac.
    Whilst denying fresh pop ups helps the items still seem to be listed.
    I have two iPhones using two different Apple IDs and obviously two numbers  along with an iPad and the Mac running Messages.
    Periodically each devices gets a pop up saying Messages is trying to display all the options on all devices again
    As William said the simplest method is to Untick the item in the list of Alternatives.
    8:38 pm      Wednesday; January 15, 2014
      iMac 2.5Ghz 5i 2011 (Mavericks 10.9)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb (Snow Leopard 10.6.8)
     Mac OS X (10.6.8),
     Couple of iPhones and an iPad

  • How to disable my iphone phone number imessage on old account

    So I was on the same apple id as my mother, who told me today that messages were poping up on her ipad.  I now created a new apple id because i do not want her reading my messages.  On the old apple id, she can click my phone number and recieve my messages, i clicked to send and recieve only on my phone on my iphone and i am frightened half to death.  Someone please help on how i can remove my phone number from her imessage list!!!!!!

    Read this:
    http://support.apple.com/kb/TS4268

  • IMessage detached from my phone number. How do I reattached as phone number to be the default?

    When I send. Text message to another iPhone it is sent via my email address. How would I reattach my phone number to be the default to send and receive the texts? I recently did change my Apple ID password. When accessing settings app on my phone under iMessages there is a send &amp; receive option, however I am unable to select the phone number to create as a default.

    Hi there Xjbleasdale,
    You may find the information in the article below helpful.
    iOS and OS X: Link your phone number and Apple ID for use with FaceTime and iMessage
    http://support.apple.com/kb/ht5538
    -Griff W.

  • HT204053 how do i remove a phone number on a ipad

    How do I remove a phone number from an Ipad

    Settings>Messages>Send/Receive...uncheck her number here.
    She really needs to get her own Apple ID for iCloud, iMessage & FaceTime. As you've found out, not doing so will create a mess.
    Must be a verified email address. You can create an Apple ID here:
    https://appleid.apple.com/cgi-bin/WebObjects/MyAppleId.woa/wa/createAppleId
    That's the best solution.

  • How do I block a phone number calling my iPhone?

    How do I block a phone number calling my iPhone, so it only hears a busy tone?

    You cannot do this on the iPhone - this is a feature/service that must be provided by the carrier. Contact your carrier and ask if they can do this. In the US, for example, AT&T offers as part of the SmartLimits package.

  • I have set up a iTunes account but I have changed my number and now I can't download apps it keeps saying previous billing problem how do I change my phone number with out setting up a new iTunes

    How do I change my phone number on iTunes. On my phone just I can't download any apps due to a problem with the numbers not matching

    You're really posting in the wrong forum. you should be posting here ( https://discussions.apple.com/community/itunes/itunes_store ) Or calling apple support directly.

  • How do I disconnect my phone number from an Apple ID that I don't know the PW to?? Thanks!!

    Hi everyone! How do I disconnect my phone number from an Apple ID that I don't know the PW to?? I am trying to help my friend - she got divorced from her husband who has her phone number under his Apple ID. He claims he doesn't remember the PW and that Apple couydn't help him?! Any thoughts? Thanks!!

    1. He is lying.
    2. Require him to buy her a new iPhone in the settlement.

  • HT1918 How do i change the phone number on my apple ID account so i can use messaging with my Ipod Touch 4th gen?

    How do I change my phone number on my Apple ID account? Not the number for billing. I got a new Ipod touch and when I was setting it up my emails where correct but the phone number was wrong. The gentlemen at the Apple Store told me just to go on my account on my computer and change it but i cant find where. Only part i know how to change is the billing number. Thanks.

    If you can remember them their current answers you can login here and change them : https://appleid.apple.com , click on 'Manage your Apple ID' and then 'Password and Security' on the left-hand side of your account's page
    If you can't remember their answers and you have a rescue email address (which is not the same thing as an alternate email address) set up on your account then you can try going to https://appleid.apple.com/ and click 'Manage your Apple ID' on the right-hand side of that page and log into your account. Then click on 'Password and Security' on the left-hand side of that page and on the right-hand side you might see an option to send security question reset info to your rescue email address.
    If you don't have a rescue email address (you won't be able to add one until you can answer 2 of your questions) then see if the instructions on this user tip helps you get them reset : https://discussions.apple.com/docs/DOC-4551

  • How do I change the phone number that ipad is using for iMessage and FaceTime

    Since the latest iOS update my ipad uses my husbands phone number for iMessage and FaceTime. How do I change the phone number to match my iPhone?

    Sign out of FT and iMessage on both your iPad and your iPhone. Sign back in on the iPhone. Wait for everything to activate. Then, sign back in on the iPad using the same Apple ID.

  • How do i change the phone number for my apple id on my iphone5 ?

    how do i change my phone number under my apple id on an iphone5 ?

    To manage the Apple ID:
    https://appleid.apple.com

  • How do I change the phone number of an original iPhone

    My oldest daughter just got a new phone for xmas. She is giving her original iPhone to her sister (who's iphone was stolen) I erased the content, but how to I change the phone number to my younger daughter's #, which is still active.

    I thought the data erase feature was only on the new G3's? We did think she had password lock on, which is why we figured it couldn't be returned. We thought whoever found it (she knows she lost it on the school bus, there were only two other high school girls on the bus at the time) couldn't get in to figure out who it belonged too...now we realized she had turned it off and someone actually "stole it" v. "found it"

  • How do I change the phone number where sms is sent to activate keychain?

    How do I change the phone number where sms message is sent to activate Keychain?  It keeps sendingit to an old phone #, and is most frustrating!

    System preferences > iCloud > Keychain > options.

Maybe you are looking for