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 6654375
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T01:22:59+00:00 2026-05-26T01:22:59+00:00

I am working w/ Ext 3.3 How can I do conditional value checking, on

  • 0

I am working w/ Ext 3.3
How can I do conditional value checking, on the Ext.data package level, like;
if the person is married, require spouse name, otherwise let it be blank.

The solution I am looking for should be on the data package. (lets say that I dont have much control about how data is edited, but I am responsible for validating it.)
Ext.Data.Field lets me say allowBlank, true or false. I wonder if I can pass a function there which accepts the record, and returns true or false based on the other fields on the record.

I am looking for an alternative solutions for this, on the Ext.data package, (on the Store or Record level).

  • 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-05-26T01:23:00+00:00Added an answer on May 26, 2026 at 1:23 am

    It depends on when you are doing the validation.

    If you are validating when store.load(); is invoked, then I suggest the following:

        myStore.on('beforeload', function(store, loadOptions) {
            var isValid = true;
            var modifiedRecs = store.getModifiedRecords();
            Ext.each(modifiedRecs, (function(record, index, modifiedArray) {
                // do validation here
                // if validation failed, use the following two lines of code:
                // isValid = false;
                // return false;   // this exits modifiedRecs.each
            }, this);
            return isValid;  // If falsey, this return statement cancels loading.
                             // Note: the 'loadexception' event will be now be fired
                             // by myStore if isValid is falsey.
        });
    

    If you are validating whenever data changes in the store, then use the following:

        myStore.on('beforesave', function(store, data) {
            // simply do validation against `data`.
            // data will contain an array of records for each type of action that
            // was being saved, e.g., data['update'] === [updatedRec1, ...].
            // if validation failed, just `return false` to cancel saving.
        });
    

    Here’s what it means to be falsey.

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

Sidebar

Related Questions

i am newbie to Ext Js..i am working on ruby on rails... can any1
I have a nice working Ext.grid.Panel, with column headers you can click on to
Working with TCL and I'd like to implement something like the Strategy Pattern .
I'm working on checkBoxTree in GWT-EXT 2.0.3 with Java. My aim is to get
Can someone help me. Why it is not working import ftplib import os def
I would like to update my local working environment to be stricter in an
is there a way i can stop a row of data being entered into
I'm working on a Python package named lehmer that includes a bunch of extension
I'm working on application which has workflow like this: 1.parsing home page (using HttpURLConnection,
I have a working Ext.List object in my Sencha Touch application. I'm rendering each

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.