Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8006163
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T17:25:21+00:00 2026-06-04T17:25:21+00:00

I am creating a model for a form which needs some validations. The model

  • 0

I am creating a model for a form which needs some validations.

The model looks like this:

//Defining a data structure for the Work Item List
Ext.define('InfoImage.model.configure.configModel', {
    extend : 'Ext.data.Model',

    config : {
        //Defining the fields required in the Work Item List
        fields : [ 'servname', 'port', 'protocol', 'username', 'password',
                'domain', 'appconfig', 'apptitle', 
                'appconfig' ],

        validations : [ 
        {
            type : 'presence',
            name : 'servname'
        }, 
        {
            type : 'presence',
            name : 'port'
        //  matcher : /[0-9]{4}[A-Z]+/
        }, 
        {
            type : 'presence',
            name : 'username'
        },
        {
            type : 'presence',
            name : 'password'
        }],
        proxy : {
            type : 'localstorage',
            id : 'configId'
        }
    }
});

I tried calling the validation by

Ext.getCmp('form').validate();

but it says that it has no method called validation.

Does sencha provide a method for validation? If yes, how can i achieve it?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T17:25:22+00:00Added an answer on June 4, 2026 at 5:25 pm

    Sencha does indeed provide a method for validating models. Have a read through the docs: http://docs.sencha.com/touch/2-0/#!/guide/models-section-3

    I guess you can use form.getValues() to populate a new model, and then use the validate() method on the model to validate the data.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a jQuery Model windows which contains a form. On creating of the
I am creating a model object like this: $object1 = new Object1(); There is
If I am creating a list of new model objects based on some form
I have some ASP.NET (MVC2) auto generated html which is creating forms looking like
I am creating a model binder to use with asp.net mvc. This is what
I'm new to Django, trying to process some forms. I have this form for
I'm building some crude CMS-like functionality (to get acquinted with Play Framework). For this
I have a problem in creating an AJAX-based form submission which if its response
I have a form used for creating a team (the model is Team). The
I am creating a form in an ASP.NET MVC 3 view, in which one

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.