1. #1
    Sencha User
    Join Date
    Apr 2012
    Posts
    36
    Vote Rating
    -2
    arpit2438735 is an unknown quantity at this point

      0  

    Default Unanswered: Use RegExp in place of Matcher

    Unanswered: Use RegExp in place of Matcher


    How to add RegExp in any field as matcher is not working and I want to add own define set of RegExp function for html that why I want to use this function so how can I use it in any field?It would be great help

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,756
    Answers
    3462
    Vote Rating
    828
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    What do you mean matcher on a field? A form field or a route?
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Apr 2012
    Posts
    36
    Vote Rating
    -2
    arpit2438735 is an unknown quantity at this point

      0  

    Default


    A form field which we define in Model folder

  4. #4
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,756
    Answers
    3462
    Vote Rating
    828
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Quote Originally Posted by arpit2438735 View Post
    A form field which we define in Model folder
    So you have a form field that you put into the app/model/ directory? That's the wrong place if that is true, should go under app/view/
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  5. #5
    Sencha User
    Join Date
    Apr 2012
    Posts
    36
    Vote Rating
    -2
    arpit2438735 is an unknown quantity at this point

      0  

    Default


    I define in view and model too.I define validation of that field in model in which I am using matcher but I want to use regexp

    It is placed in Model

    Code:
    Ext.define("PlayListApp.model.Play", {
        extend: "Ext.data.Model",
        config: {
            idProperty: 'id',
            fields: [
                
                { name: 'title', type: 'string' },
                { name: 'duration', type: 'int'},
                { name: 'hidden', type: 'string' }
            ],
            validations: [
                
                { type: 'presence', field: 'title', message: 'Please enter a link in playlist.' },
                { type: 'format', name: 'duration',matcher:/^[0-9]*$/, message:  'Please enter duration in playlist'},
                //{ type: 'length', name:'duration', min:'1', max:'3', message:'Please enter digit between 1 and 3'}
            ]
        }
    });
    In View
    Code:
     xtype: "fieldset",
                    items: [
                        {
                            xtype: 'textfield',
                            name: 'title',
                            label: 'Link',
                            placeHolder: 'http://yousite.com',
                            required: true,
                           
                        },
                        {
                            xtype: 'textfield',
                            name: 'duration',
                            label: 'Duration',
                            placeHolder:'99',  
                            required:true
                        },
                        {
                            xtype: 'hiddenfield',
                            name: 'hidden'                                          
                        }
                    ]
                    
    
    
                }

  6. #6
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,756
    Answers
    3462
    Vote Rating
    828
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Code:
    { type: 'format', name: 'duration',matcher:/^[0-9]*$/, message:  'Please enter duration in playlist'}
    The matcher config is RegExp. Instead of the name config, I'm pretty sure you meant field.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  7. #7
    Sencha User
    Join Date
    Apr 2012
    Posts
    36
    Vote Rating
    -2
    arpit2438735 is an unknown quantity at this point

      0  

    Default


    Yes I want to add mean similar to matcher as matcher is not working properly for duration mean I want to add max and min value and for link also I want that user add only website like http://something.com like that why I am saying Regexp and in HTML5 it is very easy to implement.Is there any alternative or how can I add these condition so to validate both fields

Thread Participants: 1

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