You found a bug! We've classified it as EXTJS-9837 . We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
  1. #1
    Sencha User
    Join Date
    May 2012
    Posts
    1
    Vote Rating
    0
    mtg.wai.liauw is on a distinguished road

      0  

    Default Duplicate validation error message in fieldcontainer

    Duplicate validation error message in fieldcontainer


    Repro:
    http://jsfiddle.net/8umwC/1/

    Type non-date value in the datefield.


    The bug happens when the msgTarget is set to 'under' in fieldDefaults.

    *EDIT BY SLEMMON
    Tested OK in 4.1.3
    Issue observed in 4.2 and 4.2.1.870

    Inline test case:
    Code:
    new Ext.FormPanel({
        renderTo: Ext.getBody(),
        border: false,
        fieldDefaults: {
            labelAlign: 'top',
            msgTarget: 'under'
        },
        items: [{
            xtype: 'fieldcontainer',
            fieldLabel: 'Test Field',
            combineErrors: true,
            layout: {
                type: 'hbox'
            },
            items: [{
                xtype: 'datefield',
                minDate: new Date()
            },{
                xtype: 'combo',
                allowBlank: false
            }]
        }]
    });
    Last edited by slemmon; 14 May 2013 at 8:50 AM. Reason: added inline test case and additional test versions

  2. #2
    Sencha - Support Team slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    5,075
    Vote Rating
    186
    slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold

      0  

    Default


    Thanks for the report! I have opened a bug in our bug tracker.

  3. #3
    Sencha User makana's Avatar
    Join Date
    Apr 2008
    Location
    Dresden, Germany
    Posts
    527
    Vote Rating
    19
    makana has a spectacular aura about makana has a spectacular aura about

      0  

    Default


    Hey guys,

    I ran into the same problem. Here's how I fixed this.

    Code:
    Ext.define('Ext.override.form.FieldContainer', {
    	override: 'Ext.form.FieldContainer',
    	/**
    	 * @inheritdoc
    	 * @protected
    	 */
    	initComponent: function()
    	{
    		// is an empty string in the prototype
    		if (this.combineErrors && Ext.isEmpty(this.invalidCls))
    			this.invalidCls = Ext.form.Labelable.prototype.invalidCls;
    		this.callParent(arguments);
    	},
    	/**
    	 * @inheritdoc
    	 * @protected
    	 */
    	onAdd: function(item)
    	{
    		this.callParent(arguments);
    		if (item.isLabelable && this.combineErrors)
    			item.msgTarget = 'none';
    	}
    });
    Programming today is a race between software engineers striving to build bigger and better Ń–diot-proof programs, and the universe striving to produce bigger and better idiots. So far, the universe is winning. (Rick Cook)

    Enhanced ExtJS adapter for Adobe AIR

  4. #4
    Sencha User
    Join Date
    Jul 2007
    Posts
    48
    Vote Rating
    0
    KampfCaspar is on a distinguished road

      0  

    Default


    issue present in 4.2.1 GPL; above-mentioned workaround seems NOT to work on 4.2