Results 1 to 3 of 3

Thread: Modern Ext JS6 6.2 isValid() is not a function

  1. #1
    Sencha User
    Join Date
    Jul 2018
    Posts
    11

    Default Modern Ext JS6 6.2 isValid() is not a function

    Can I use the isValid () method in the modern version as I use it in the classic version?
    In the classic version it works, but in the modern version is error: form.isValid () is not a function


    //FeedForm.js

    Ext.define('FeedViewer.view.main.FeedForm',{
    extend:'Ext.form.Panel',
    xtype:'feedform',

    requires:[
    'Ext.Button',
    'Ext.field.Select',
    'Ext.form.FieldSet',
    'Ext.Toolbar'
    ],

    title:'New RSS Feed',

    items:[{
    xtype:'fieldset',
    items:[
    {
    xtype:'selectfield',
    label:'Select a new feed',
    labelAlign:'top',
    allowBlank:false,
    name:'feedUrl',
    options:[
    {value :'http://rssfeeds.usatoday.com/usatoday-NewsTopStories', text :'USA Today Top Stories'},
    {value :'http://sports.espn.go.com/espn/rss/news', text :'ESPN Top News'}
    ]
    }
    ]
    },{
    xtype:'toolbar',
    docked:'bottom',
    items:[{
    xtype:'button',
    reference:'savebutton',
    action:'save',
    ui:'action',
    text:'Add'
    }]
    }]
    });

    //Controller
    form = me.dialog.down('form')'

    if(form.isValid()){

    }

  2. #2
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,450
    Answers
    3997

    Default

    This was one of the feature gaps that we attacked with 6.5: https://docs.sencha.com/extjs/6.5.0/...method-isValid

    So in 6.2, all that field validation stuff isn't really there so you'd have to do things manually... or upgrade to 6.5 but there aren't any GPLs newer than 6.2.0 if that's a dealbreaker for you.
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Fullstack Engineer
    ________________
    Modus Create is based on the model of an open source team. We’re a remote, global team of experts in our field. To find out more about the work we do, head over to our website.

    Check out my GitHub:
    https://github.com/mitchellsimoens

  3. #3
    Sencha User
    Join Date
    Jul 2018
    Posts
    11

    Default

    Quote Originally Posted by mitchellsimoens View Post
    This was one of the feature gaps that we attacked with 6.5: https://docs.sencha.com/extjs/6.5.0/...method-isValid

    So in 6.2, all that field validation stuff isn't really there so you'd have to do things manually... or upgrade to 6.5 but there aren't any GPLs newer than 6.2.0 if that's a dealbreaker for you.

    I used in model validations:
    validations : [{
    type: 'presence',
    field: 'firstName',
    allowEmpty: true,
    message: 'First name can not be blank.'
    },{
    type : 'presence',
    allowEmpty: true,
    field : 'lastName',
    message: 'Last Name can not be blank.'
    }];
    Version modern works great; but in version classic doesn't work store.async(). I see red triangle in corner grid. Local storage doesn't work. error: duplicate validation

    When delete validations with model:
    validations : [{
    type: 'presence',
    field: 'firstName',
    allowEmpty: true,
    message: 'First name can not be blank.'
    },{
    type : 'presence',
    allowEmpty: true,
    field : 'lastName',
    message: 'Last Name can not be blank.'
    };
    Version classic works great.

Similar Threads

  1. Replies: 1
    Last Post: 2 Sep 2015, 11:43 AM
  2. Ext Js isValid function is not working.
    By deb440 in forum Ext 3.x: Help & Discussion
    Replies: 1
    Last Post: 5 Aug 2013, 7:57 AM
  3. Ext.Date.isValid function isn't working as expected
    By viniciuscs in forum Ext: Q&A
    Replies: 1
    Last Post: 2 Feb 2012, 10:16 PM
  4. How can I get the invalid fields after function isValid() is excuted
    By erichua in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 28 Oct 2008, 3:46 PM
  5. [2.0.1][SOLVED]form isValid function return always true
    By kimu in forum Ext 2.x: Help & Discussion
    Replies: 3
    Last Post: 17 Feb 2008, 9:12 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •