How do you ensure that what I typed in the Phone number must be an 8 digit number?

Hi all,
I am now creating a text box that allows a person to type in an 8 digit phone number according to my country's specifications. If a person types in a single digit, how do I have a validation check to ensure that he has to type in 8 digits? Under Validation Pattern, I typed in 99999999 but the person can still type in a single digit and still pass through! It will only validate when a person types in more than 8 digits.
What gives?
Thanks for reading!

Again, I use code to check the string against a regular expression. My expressiong validates that a string contains valid US phone pattern. Ex. (999) 999-9999 or (999)999-9999 or 1234567890
Here's my function that I put in a script object called scoAllScripts:
function validateUSPhone(strValue) {
DESCRIPTION: Validates that a string contains valid
US phone pattern.
Ex. (999) 999-9999 or (999)999-9999 or 1234567890
PARAMETERS:
strValue - String to be tested for validity
RETURNS:
True if valid, otherwise false.
var objRegExp = /(^\d{10}$)|(^\([1-9]\d{2}\)\s?\d{3}\-\d{4}$)/;
//check for valid us phone with or without space between
//area code
return objRegExp.test(strValue);
Here is the code that I put in the Exit event of my phone number field:
if (!this.rawValue == "") {
if(!xfa.form.FSOrder.PAGE1.variables.scoAllScripts.validateUSPhone(this.formattedValue)) {
xfa.host.messageBox("Please enter a telephone number including area code in the format '1234567890' or '(999) 999-9999'");
Hope that helps.
If you need more help with field validation (i.e, more regular expressions), you can easily find RegExpr pages using a Google search.

Similar Messages

  • Im syncing my iphone to itunes because i cant unlock the phone due to water damage so that i can take what is on it and put it on a new phone. how can i ensure that everything was taken from the phone and where can i find it in itunes?

    my phone recently suffered water damage so that the screen does not reigster when i slide to unlock. I am sycing the data from the phone onto itunes so i can put it onto a new phone. How can i ensure that i took everything off of the old phone before i restore it and where can i find all of that stuff when i sync with the new phone?

    iTunes will only store a back up of the iPhone and you find this by following the steps below:
    Windows
    Edit>Preferences>Devices
    Mac
    iTunes>Preferences>Devices
    The link below can show you what is stored in an iTunes back up:
    iTunes: About iOS backups

  • Does VUDU come on Apple TV? If not, how do you recommend that Apple at it to the iTunes Store?

    IS VUDU available on Apple TV?
    If not, how do you recommend that Apple add it to the iTunes Store?

    It is not listed in Apple's list of Apple TV apps…
    https://www.apple.com/appletv/whats-on/
    You would need to do something to an Apple TV that will get this post deleted, see if you can guess what that is.
    You could just buy a device that actually supports the services you need…
    https://www.roku.com - it is a channel that can be added to a Roku.
    http://www.vudu.com/setup_roku.html
    Other media boxes also support Vudu (Chromecast, Xbox, Playstation, Android, WDTV… basically everyone who isn't Apple).
    If you think Apple will add Vudu as an Apple TV channel ask them via the feedback form. Just bear in mind that Vudu directly competes with iTunes video sales & rentals.
    http://apple.com/feedback/

  • How do you find out what information is in the 'other' section of itunes when iphone is connected

    How do you find out what information is in the 'other' section on the bottom of itunes

    You don't
    If it is much more than a gb or so, then it indicates corrupt files.  A restore should resolve.

  • HT4061 how do you take someone  old own icloud  off the phone

    i have just got a iphone4 a ues on e but what i am wanting to no how to i take there old how do you take someone  old own icloud  off the phone so i can use the phone

    Is the phone running iOS 7? If so, then you would need to know the Apple/iCloud ID and password of the previous owner in order to remove the iCloud account from the phone.
    If you don't know the ID and password, then you should return the phone for a refund.
    Sorry,
    GB

  • When a cd is not recognised by gracenote data base, how do you ensure that it dowloads all together in recently added. I am trying to download a nn 8 disk compilation and itunes is putting all track 1/track2 etc together

    i am trying to download a compilation of 8 cds which are not recognised by gracenote database. how do I ensure that the disks download seorately. My last try had all track 1/2/3 together rather than 1 - X in each cd

    Perhaps it would be helpful for you to view the page source code of this page
    http://www.alanwork.com/
    As you can see, the submenu code links are immediately below the top level code, and are
    wrapped in their own  <UL> </UL> tag pairs.
    Hope that helps

  • How do you move information from your sim to the phone memory? How do you move information from your sim to your iPhone ?

    HOw do you move information from sim to phone memory on iPhone 3GS

    in Settings/ Mail,Contacts,Calendar  there is an entry "Import SIM Contacts".

  • How do you ensure that WiFi is selected over Cell?

    I have not had a Smartphone or Data Contract until my iPhone 5.  I am looking for tips on how to ensure WiFi is prioritized for Data vs. Cellular, but don't know how best to configure this prioritization.  I tried just turning the Cellular Data Off, but that causes Voice Mail to be turned off as well.  When I depressed "Phone" and then "Voice Mail Icon" for the first time, it said I had to set up Voice Mail.  It told me to enter a password and then re-enter it.  I saved that and then it asked if I wanted to use a "Default" greeting or a "Customer" one.  I selected "Customer" and recorded one.  Next it said, "Voice Mail is currently not available, try again later.  I tried a number of times and it continued to be unavailable.  I then tried a different meathod, by just going to "Phone" and then "Keyboard" and then depressing and holding "1".  It said I needed to setup Voice Mail and that Cellular Data needed to be turned on to use Voice Mail.  I turned that on and then recorded a password and greeting.  It was a totally different graphical walkthrough vs. the first meathod.  I tested it and the greeting now works.  Am

    As woodmeister50 said, the WiFi will be used preferentially by the iPhone when both cellular and WiFi are available and turned on - this is automatic. Unfortunately if you are concerned about that, there is no way to be sure you are not using cellular data unless you turn cellular off (either through Airplane Mode or Celllular settings), but obviously you need the cellular network for Voice Mail and calls.
    By the way, you can turn Airplane Mode on and subsequently turn WiFi on (Airplane Mode will turn it off, but you can just toggle it back on), which will also ensure you are using WiFi only.

  • How can I ensure that Adobe Encode will find the files Adobe Premier creates

    I can't export  video audio sequence.
    I invoke the "Export" function and Adobe Encoder starts.
    When I click on the "Start Queue" button the Adobe Encoder fails and gives the following message.
    - Source File: C:\Users\stan\AppData\Local\Temp\road walk-1_2.prproj
    - Output File: C:\Users\stan\Videos\Sequence 01.3gp
    - Preset Used: 3GPP 176 x 144 H.263
    - Video:
    - Audio:
    - Bitrate:
    - Encoding Time: 02:14:39
    9/29/2014 5:44:22 PM : Encoding Failed
    Could not read from the source. Please check if it has moved or been deleted.
    When I check for the location of the source as noted in this message there is no source there.
    The Adobe Premier application saved the project in another location.
    How do I overcome this problem and get the save location for the project to be the same as the source location for the Adobe Encoder

    It's not always as clear where the program's putting things as you might hope. At setting PrPro to export, check the entire line of material it thinks it is exporting for accuracy. (Often it may choose say, the workbar or a couple clips when I thought I'd exported a whole sequence.) When AME first pops up, do check in the line for the export, the complete file-name it has for everything. I've found quite often it has decided for some reason to either grab something that isn't what I intended to export or is putting it say where it put something 2 exports back. Had I not caught those, I'd have been totally clueless also.
    I hope this helps ... if not, well, gremlins are nasty little buggers to deal with ...
    Neil

  • How do I ensure that linux would work on the new Dell Latitude E6400?

    I want to purchase this laptop:
    http://www.dell.com/content/products/pr … l=en&s=bsd
    with this configuration:
    PROCESSOR    Intel® Core™ 2 Duo P8400 (2.26GHz, 3M L2 Cache, 1066MHz FSB)    edit
    OPERATING SYSTEM    Genuine Windows Vista® Home Basic SP1, With media    edit
    WARRANTY & SERVICE    3 Year Limited Warranty and 3 Year Mail-in Service    edit
    LCD PANEL    14.1" UltraSharp™ WXGA+ (1440x900) LED Display - Brush Metal Black    edit
    GRAPHICS AND EXPANSION SLOT    Mobile Intel® Graphics Media Accelerator 4500MHD With Express Card    edit
    MEMORY    2.0GB, DDR2-800 SDRAM, 2 DIMMS    edit
    INTERNAL KEYBOARD    Internal English Keyboard    edit
    CAMERA/MICROPHONE    Digital Microphone    edit
    PRIMARY STORAGE    80GB Hard Drive, 7200RPM with Free Fall Sensor    edit
    OPTICAL DRIVE    24X CDRW/DVD with Cyberlink PowerDVD™    edit
    WI-FI WIRELESS CARD    Intel® WiFi Link 5100 802.11a/g/n Draft Mini Card    edit
    FINGERPRINT READER OPTION    No Fingerprint Reader    edit
    BACKUP OS DRIVERS AND SYSTEM DOCUMENTATION    Resource DVD - Contains Diagnostics and Drivers    edit
    My Accessories
    BATTERY    9 Cell Battery    edit
    PRIMARY POWER OPTIONS    90W A/C Adapter (3-pin)    edit
    I really want to get this laptop soon, but I'll be so irritated if I tried to install arch on it and it doesn't work. Thank you for your help.

    Well, from the 'first look' reviews (there's a first look review dated today!), it seems to be a brand new model, which means there won't be many folks who have tested it. It depends on what you mean by 'work' as well. Arch is almost sure to install a basic system, but things like suspending, cpu speed changes, and wifi usually take some work on most distros in my experience. One thing to do is to google for some of the components to see if linux users have had success. Two important ones are the video card and the wireless card. If those look good, then give it a try. You might need to work at it a bit, but I usually manage with help from the forums You could even write up your experience on a wiki so that others can benefit from your experience...

  • How do you get special symbols for typing in the mail app.

    Auyone know ?

    Contact the vendor or credit card company.  This is a user-to-user help forum.  We cannot assist you with this type of problem.

  • Can I use the color splash app on my imac instead of my iphone?  How do you do that?

    can I use the color splash app on my imac instead of my iphone?   How do you do that?

    Software written for the iPhone and other iOS devices can't be run on a Mac.
    (61491)

  • HT1386 What is "other" in the storage category and how do you reduce that amount?

    What is "other" in the storage category and how do you reduce that amount?

    A  ' Large Other ' usually indicates Corrupt Data...
    First Try a Restore from Backup... But... if the Large Other Persists, that is an Indicator of Corrupt Data in the Backup... Then a Restore as New is the way to go...
    Details Here  >  http://support.apple.com/kb/HT1414

  • I have iphone5 and now been given Nokia lumia 520 for work. How can I ensure that my calendars all sync in real time between each phone? Many thanks for any advice

    I have iphone5 and now been given Nokia lumia 520 for work. How can I ensure that my calendars all sync in real time between each phone? Many thanks for any advice

    Well if you got the Phone Pggray43 at a Local Corporate store in your Area)  you should be able to return it as long as you have all the contents.!  Phone, Charger and any other accessories that came with it the Box of Course.. As long as you have not went past the 14 Day return.. the store can go over what you used as in Air Time and Data..
    Now if you've went past the 14 Day return you be Liable to pay a E.T.F =  Early Termination Fee the fee for this is around $300 so hopefully you have not went past the 14 Day return window the Manager if Available is the one I would talk to tell them your on Social Security and you just can't afford a phone as this I'm sure they'll work with you to get something solved..
    Hope ya have Good Luck.! b33

  • How can i ensure that the time capsule back up all my data?

    how can i ensure that the time capsule back up all my data and no any data missed during the back up? becz i was backing up my mac to time capsule for the first time and it takes only 5 hourse for 279GB which is doesnt make sense
    any idea, how to ensure that all my data been backed up

    well this tells you why you are having issues.. since you have a filevault and unless you are logged on as that user TM has no way to backup the vault.
    so that is why the backup is so small.
    And you cannot remove the file vault because the disk is too small.. you are in catch 22..
    You cannot backup and you cannot remove the vault..
    Login as the user who has the file vault and copy the files off the computer to a directory on the TC.. Then just delete the files on the computer.. that will then allow you to remove the file vault.
    But never  will I ever use file vaults so I am being theoretical .. please read it up yourself.
    http://pondini.org/TM/25.html
    You are not doing the background reading you need to understand what you are doing..
    read the whole of pondini's info.. or at least skim it so you know what is there.
    Avoid like the plague file vaults..
    When disks go belly up, as they always do.. your files will be lost. Somewhere they need to be stored in the clear.. so why bother .. put better security on the computer and forget vaults.

Maybe you are looking for