Urgent !!! How to trim spaces of an email filed ?

Hi,
I have an email field in a form ,which have a validation at the time of submission of form as shown in the below .
function isEmailValid(fld){
                    var result = true;
                    if(fld != null){
                              var r = new RegExp();
                        r.compile("^[a-z0-9_\\-\\.\\']+\\@[a-z0-9_\\-\\.]+\\.[a-z]{2,4}$","i");
                              result = r.test(fld.rawValue);
                    return result;
but if user by mistakely enters the space in that field  at the time of validation it is  showing an error called "Invalid Email Format"
I need to trim those spaces either modifying the above regular expression or the best way
Please suggest ..
Thanks in Advance
Bharathi

In the exit event of your email field put:
this.rawValue = this.rawValue.replace(/\s/g,"");
Kyle

Similar Messages

  • How to trim spaces from string in BMM layer?

    Hi friends,
    I need to trim spaces from the string. can you please give me syntax with example.
    Thanks

    Hi
    I have tried the below option , but it did not work . PS_D_PERSON
    PERSON_ID is char type in the data base oracle , and it is defined as varchar on the physical layer .
    So the table is loaded with space , i am not able to remove the space using trim both
    Thanks
    Sridhar.N

  • Urgent how to trim the spaces that in the text fileds?

    Hi ,
    I have an email field .If a  person enter the value in to the field along with space i need to validate that field by removing spaces.
    I already have validation for this email field as shown below..
    function isEmailValid(fld){
                        var result = true;
                        if(fld != null){
                                  var r = new RegExp();
                            r.compile("^[a-z0-9_\\-\\.\\']+\\@[a-z0-9_\\-\\.]+\\.[a-z]{2,4}$","i");
                                  result = r.test(fld.rawValue);
                        return result;
    suggest the best how i will do that
    Thanks in advance
    Bharathi

    Hi Bharathi,
    I use this JavaScript function to trim whitespace.
    function trimWhitespace(value)              
        if (value.replace)
            return value.replace(/^\s*(.*?)\s*$/, '$1');
        else
            return value;
    Hope it helps,
    Bruce

  • How to trim spaces in SQL?

    Hi there,
    I have installed Oracle XE on my machine and have populated it with some data. In one table,namely the Id column i noted there are spaces before the actual code. For example _ _ _12345. My question is, how do i removed these spaces? I am using Oracle SQL Developer to query the tables in XE. I have over 100,000 records.
    Thanks for the help
    SI

    http://download.oracle.com/docs/cd/E11882_01/server.112/e10592/functions002.htm#CJAEEJFC
    Refer to the TRIM, LTRIM and RTRIM functions and issue an appropiate UPDATE statement
    Sybrand Bakker
    Senior Oracle DBA

  • URGENT : How to add spaces in the outbound file

    Hi Gurus,
    I am writing data from SAP to a Unix file via an ABAP program.
    The file has one record with 4000 characters with 2000 spaces in between the datas.
    Is there any command to add these spaces ? Or I have to go through a loop to add them ? I cannot leave them and assume that they will be spaces by default,as this is causing some error in Unix side.
    Please help,this is urgent.
    Regards,
    Sandip.

    heyy i could find the solution to it....so am closing the thread..thanksss

  • How to eliminate spaces while reading a file in BPEL Process

    Hi All,
    How to eliminate space when reading a file which of fixedlength and inserting into database.
    Inserting some of columns sucessfully but there is a column where there is a space n front the value, how to eliminate the that space.
    I have a custom XSD and using out in the process. How to resolve this issue to get all rows sucessfully inserted into the database.
    Anyone hod gone through this kind of functionality.
    Regards,
    CH

    Hi,
    try to use XPath functions like 'normalize-space()', 'right-trim()', 'left-trim()' in your transformation.
    Regards,
    Martin.

  • URGENT: How to create Map IDs

    I am using RH7, have inherited a help project in which all topics have been assigned map IDs. I have created several new topics (at the root level) and do not know how to create map IDs for the new topics. I need step-by-step help on how to create IDs without disrupting the current IDs.

    Thanks William. I'm all set now.
    Date: Tue, 18 Aug 2009 08:47:58 -0600
    From: [email protected]
    To: [email protected]
    Subject: URGENT: How to create Map IDs
    Hi,
    Start by reading the article on Peter's site: http://www.grainge.org/pages/authoring/calling_webhelp/using_map_ids.htm
    If you have any questions after that, just post back. You'll be able to make your question more specific.
    Greet,
    Willam
    >

  • How to free space in icloud with out loosing my pictures?

    I need to know step by step how to free space in icloud from y devices Iphone, ipad and itouch with out loosing my pictures. I do not know how to save all my pictures from my iphone to my PC
    Thank you

    Don't use icloud to archive/save photos, these must be saved to a computer.
    Read this...  import photos to your computer...
    http://support.apple.com/kb/HT4083
    As for make more free space on icloud...
    Delete old emails you no longer want,
    Go through your calendars, contacts, etc. and delete those you no longer want,
    Delete backups:  Settings>iCloud>Storage & Backup>Manage Storage, tap the device name and on the resulting screen, scroll down and tap on Delete Backup.

  • How Do I Know If All Email Deleted is Really Deleted?

    I use a mid 2012 Mac Pro; run Mavericks, Mail 7.3.  How do I know if all email deleted is really deleted from my hard drive?

    How deleted do you need it to be?
    QuickTimeKirk says it may never have been stored on your Mac.  This assumes your mail connection is via IMAP, which keeps the mail on the mail server.
    If you were using POP connection for mail, then your mail would be stored in
    Finder -> Go -> Go to folder -> ~/Library/Mail
    and
    Finder -> Go -> Go to folder -> ~/Library/Mail Downloads
    Any file deleted, will just have its name in the directory removed, and the storage given back to the file system to reuse at a future date.  Until the file system gets around to reusing the storage, it will still have the contents of the email written on it.
    If you are using System Preferences -> Security -> FileVault, then the deleted storage will just be encrypted random bits.  Otherwise, it may be possible to recovery the email with the right specialized tools and enough time and money, right up until the storage is reused for another file (and even then with a lot more money and time, it may be possible to recover the email; when I say a lot more money, I really a whole bunch of money).
    You can use Disk Utility to "Erase Free Space".  This cause Disk Utility create a file, then grow that file until all the unused storage, including your deleted email are allocated to this file.  The file is overwritten with an erase pattern, and then Disk Utility deletes the file, and now all the unused storage contains a random bunch of erase pattern bits in them.
    If you are using an SSD (Solid State Disk), then due to the way SSD storage is managed, it is next to impossible to insure that the data is erased, and because SSD's have a limited number of writes before they start to fail, Disk Utility does no provide the Erase Free Space option, so as not to prematurely shorten the life of the SSD.  With an SSD the only way to be sure something cannot be recovered is to keep the disk encrypted using System Preferences -> Security -> FileVault.  And you would have had to do that BEFORE the email was written to the SSD, not after.
    So, how deleted do you need it to be?

  • How much free space does a 4GB ipod need?

    why does it keep saying i dont have enough free space? i already decreased the space to 3.85 GB, and its still saying i dont have enough free space. how much free space does it need?

    This is more likely a matter of Apple specifying 4G as 4,000,000,000 byte rather than 41024*10241024 byte like your computer counts.
    Using the "1000 notation", your 3.85GB would require 4.1GB. Try trimming your library down a bit more (to around 3.7G). I don't have my Nano yet, so I cannot verify if the device actually uses any of those "4G" for things other than storing your data.

  • How to get spaces

    for some of the fields in output table i need to send spaces instead of values.
    for eg:
    now i am sending values can any one please suggest how to send spaces istead of values for the following output table
    MOVE: GT_AFRU-AUFNR TO GT_OUTPUT-AUFNR,
    GT_AFRU-ERNAM TO GT_OUTPUT-ERNAM,
    GT_AFRU-ERSDA TO GT_OUTPUT-ERSDA,
    GT_AFRU-ERZET TO GT_OUTPUT-ERZET,
    i tried in this way but iam getting an error
    MOVE:   GT_OUTPUT-AUFNR = ' ',
            GT_OUTPUT-ERNAM = ' ',
            GT_OUTPUT-ERSDA = ' ',
            GT_OUTPUT-ERZET = ' '.
    please its urgent.

    Hi,
    do like this..don't use move statement.
    GT_OUTPUT-AUFNR = space,
    GT_OUTPUT-ERNAM = space,
    GT_OUTPUT-ERSDA = space,
    GT_OUTPUT-ERZET = space.
    append gt_output.
    Regards,
    nagaraj

  • HT204053 how can i move an icloud email address from one ipod to another?

    Hi
    My kids have ipods and wanted icloud activated.  Foolishly I set up an icloud email account but used my son's name on my daughter's ipod.  How can I switch the icloud email account to my son's ipod?
    Thanks,

    I don't really understand iCloud, but I have an Apple ID since both my kids are underage (8 and 11).  They share my Apple ID, but have different Ipods.  Can/Should I have separate iCloud emails for them?  To recap, I have 1 Apple account, but have 2 kids, a boy and a girl.  How do I have separate id's for their individual ipods using icloud when I have one Apple ID?

  • How can I set up an email user as "send-only" (no mailbox for receiving)?

    Can anyone tell me how I can set up an email account that can send emails but not receive emails.
    Our Web application has been using a generic email address "[email protected]" in all of our PHP Web applications as the sending email account. I have this user set up in WORKGROUP ADMIN as a proper account. However the account gets tons of SPAM emails and is constantly filling up.
    Also, all of the email accounts require SMTP authentication to send emails.
    Is there any way to identify an account as a send only account so we can generate emails from our Web applications that cannot be replied to?
    Thanks for the help
    -- Jon

    Doing so will cause issues. If you send out mail which to an outside server appears to be non existent, mail may be rejected and you may even be blacklisted.
    You can remove the account from WGM and add a role account as an alias send to /dev/null. This will look to the outside world like an existing address, but simply be discarded on your system. You should however include a working address in your mailings for people to be able to respond.
    Assuming you use local domains, edit /etc/postfix/aliases and add:
    noreply: /dev/null
    (you can change noreply with the sender used in your PHP apps, but I'd probably change the PHP apps to use noreply as this signals to people receiving your mails that this address is unattended).
    When done, issue:
    sudo postalias /etc/postfix/aliases
    sudo newaliases
    sudo postfix reload
    HTH,
    Alex

  • I have an old email address that comes up when my IPad wants to backup. Can't remember the old password  My new email is on my apple account  but not on my iCloud.  How can I change my ICloud email to my new one?

    I have an old email address that pops up when I turn on my IPad and it wants to backup the ICloud. Can't remember the password for my old email so it won't back up.  My new email is on my Apple account so that isn't a problem. how can I get my new email on the
    I cloud account so I can back up my IPad?

    settings->iclound and logout of the old appleID account

  • I've just received an email from 'Apple' saying that my apple id was used      to sign into iCloud on an iphone 5s.  I have an iphone 4.  It's asking me to sign in to confirm my details and change my password.  How do I know if this email is genuine?

    I've just received an email from 'Apple' saying that my apple id was used to sign into iCloud on an iphone 5S.  I have an iphone 4.  It then asks that I 'click here' to confirm my details and change my password.  How do I tell if the email is genuine?

    Apple will not ask you to click a link in an email. They may tell you to log in to your account to reset your password. Go to https://appleid.apple.com and log in if you ever want to change any information in your profile (or your password). And do not click the link I just posted; instead enter it into a browser.
    You can verify the devices assigned to your account by going to https://icloud.com/find (again, don't click it), where you can see a list of devices registered to your Apple ID.
    As a general rule, you should never click a link in an email or forum post without verifying it first. You can see where it goes without clicking it in most email programs and browsers by hovering your mouse pointer over it. On an iPhone you can check where it goes by holding your finger on the link (rather than just tapping it).

Maybe you are looking for

  • Can't print to printer on Windows 7 machine

    When I send a document from my MacBook to the printer attached to my Windows 7 desktop, it shows up on the print queue as a document but lags and shows as "spooling". I have yet to get this to work. I successfully networked the computers together for

  • IE 7 patch resets security settings and disables Apex login

    I have a working Apex app, and the users must use IE as one of our other applications is not certified for Firefox. Well, everything was working fine on Thursday, we were off Friday. This morning, the main Login button doesn't do anything, and I can'

  • HT1296 When I sync my iPhone to my MacBook, which way does the data flow?

    Will the contacts on my iPhone overwrite all the contacts on my MacBook? Also in iCalendar?

  • The (big) list of iPad WiFi Dropping Solutions

    Here's a list I've compiled of multiple solutions on how to fix the iPad's dropping WiFi. If your iPad can't access the internet at all then this is not the list for you. If your iPad shows incorrect password when it is in fact the right password the

  • Phishing

    '''''Moderator warning''' - I broke up those hyperlinks, they try to download a Trojan. Unacceptable in this forum. I filed a report about that URL being a phishing address.'' The web forgery link would accept the URL because it was too long... Phish