You found a bug! We've classified it as TOUCH-5297 . We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
  1. #1
    Ext JS Premium Member meditecsports's Avatar
    Join Date
    Oct 2010
    Location
    Germany
    Posts
    47
    Vote Rating
    2
    meditecsports is on a distinguished road

      0  

    Default Ext.data.Validation.length and the new Ext.data.Field.defaultValue

    Ext.data.Validation.length and the new Ext.data.Field.defaultValue


    Sencha Touch 2.3.0

    In ExtJs the Ext.data.Field.defaultValue defaults to ""; in Sencha Touch this has been changed to undefined.

    I think, this should be recognized, when a length validation occurs. In ExtJS & Touch the length validation rejects undefined and null values as false (i.e. not valid). However with the changed defaultValue in Sencha Touch, this means all fields of a fresh created (and thus empty) record will not pass through a length validation.

    The actual function Ext.data.Validation.length currently starts with:
    Code:
    length: function(config, value) {
                    if (value === undefined || value === null) {
                        return false;
                    }
       ...
    I had to change this to
    Code:
    length: function(config, value) {
                    if (value === undefined || value === null) {
                        return true; // due to a changed Ext.data.Field.defaultValue (is now undefined)
                    }
       ...
    to make it work for me.

    ...and this makes actually more sense to me: If you don't know what length a field has, then you should assume it to be ok.

    Note: To check the presence, you got another method: presence

  2. #2
    Sencha - Support Team
    Join Date
    Oct 2011
    Posts
    3,928
    Vote Rating
    129
    fmoseley is a name known to all fmoseley is a name known to all fmoseley is a name known to all fmoseley is a name known to all fmoseley is a name known to all fmoseley is a name known to all

      0  

    Default


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

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