1. #1
    Sencha User
    Join Date
    Jan 2011
    Posts
    8
    Vote Rating
    0
    hamann71 is on a distinguished road

      0  

    Default Email validation on textfield

    Email validation on textfield


    Hi there,

    Is this the right way 2 check a email text field??

    first i create the plugin

    Ext.ux.validateEmailAddress=Ext.extend(Object,
    {
    init :
    function(fld)
    {

    fld.on('blur',function(field)
    {
    var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
    //trim spaces
    var newEmailAddress=field.getValue().replace(/^\s+|\s+$/g,"");
    if(!reg.test(newEmailAddress) )
    {

    Ext.MessageBox.show(
    {

    msg:
    'Ongeldig E-mailadres opgegeven!',
    buttons:
    Ext.MessageBox.OK,
    animEl: 'mb9'
    ,
    maxWidth:
    300,
    icon:
    Ext.MessageBox.WARNING
    }
    );
    field.markInvalid();
    }

    }
    );
    }
    }
    );



    second i create the textfield with the plugin

    {
    fieldLabel: 'E-mailadres'
    ,
    enableKeyEvents :
    true,
    id:'veld_9'
    ,
    allowBlank:
    false
    ,
    name: 'veld_9'
    ,
    plugins:
    new Ext.ux.validateEmailAddress(),

    width:
    300
    }

    I wonder if this the right solution for checking a email on textfield?

  2. #2
    Sencha User
    Join Date
    Mar 2008
    Posts
    566
    Vote Rating
    0
    moegal is on a distinguished road

      0  

    Default


    have you looked at vtypes?

  3. #3
    Sencha User
    Join Date
    Jan 2011
    Posts
    8
    Vote Rating
    0
    hamann71 is on a distinguished road

      0  

    Default


    Quote Originally Posted by moegal View Post
    have you looked at vtypes?
    thanks for the intel

  4. #4
    Ext JS Premium Member
    Join Date
    Sep 2008
    Location
    Raleigh, NC
    Posts
    145
    Vote Rating
    5
    qooleot is on a distinguished road

      0  

    Default


    You just need vtype: 'email'

    Also, this is the wrong forum for asking questions.

Similar Threads

  1. Replies: 3
    Last Post: 20 Nov 2013, 11:50 AM
  2. Fixing email validation
    By ael in forum Ext 3.x: Bugs
    Replies: 6
    Last Post: 7 Jan 2011, 9:57 AM
  3. Email validation
    By issameddine in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 22 Sep 2010, 1:05 AM
  4. multiple email addresses validation
    By ext_fan in forum Ext 2.x: Help & Discussion
    Replies: 5
    Last Post: 17 Apr 2008, 10:41 PM
  5. Email Validation outside the form.
    By tnietupski in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 19 Mar 2008, 3:04 PM

Thread Participants: 2

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi