1. #1
    Sencha User
    Join Date
    May 2013
    Posts
    36
    Vote Rating
    0
    r6174 is on a distinguished road

      0  

    Default PAN Card (Indian) validator

    Hi, if any one (in India) wants validator for PAN Card Validation they can use the following code and define vtype as 'PANFormat' or you can use maskre:/^[a-zA-Z][a-zA-Z][a-zA-Z][ABCFGHJLPTabcfghjlpt][a-zA-Z][0-9][0-9][0-9][0-9][a-zA-Z]+$/, for the textfield

    Ext.apply(Ext.form.VTypes,{
    alphaNumericRe :/^[a-zA-Z][a-zA-Z][a-zA-Z][ABCFGHJLPTabcfghjlpt][a-zA-Z][0-9][0-9][0-9][0-9][a-zA-Z]+$/,
    PANFormat: function(v) {
    return this.alphaNumericRe.test(v);
    },
    PANFormatText: "Invalid PAN No. format.It must be in 'ABCDE1234F' format"
    });

    Thanks,

  2. #2
    Sencha - Support Team
    Join Date
    Feb 2013
    Location
    California
    Posts
    8,527
    Vote Rating
    228
    Gary Schlosberg has much to be proud of Gary Schlosberg has much to be proud of Gary Schlosberg has much to be proud of Gary Schlosberg has much to be proud of Gary Schlosberg has much to be proud of Gary Schlosberg has much to be proud of Gary Schlosberg has much to be proud of Gary Schlosberg has much to be proud of Gary Schlosberg has much to be proud of

      1  

    Default

    Thanks for sharing your work with the community!


    Join me at SenchaCon 2016!

Thread Participants: 1

Tags for this Thread