Results 1 to 5 of 5

Thread: Bug? Private? Or puzzle? - allowBlank for Model's field

  1. #1
    Sencha Premium Member bambam's Avatar
    Join Date
    Dec 2012
    Location
    Moscow
    Posts
    81

    Question Bug? Private? Or puzzle? - allowBlank for Model's field

    Hello!

    Just noticed interesting thing:
    1. Ext.data.field.Field has got allowBlank property, but it's private. Despite that at documentation there is guide to use this property to setup not nullable reference:
    allowBlank1.jpg
    So, is it really private, or is it could be used?
    2. If we put that allowBlank is private and we can't use it seems there is no way to allow empty value in field if there is another validation like min and max length (min!=0, max!=0). (I mean that you have to to constrain the value only if you have this value in field...)
    3. I've read the source code but haven't found any using of allowBlank in field validation (in Model). So even if I will use it and set to true (although it is true by default in according to docs) it won't work...


    It would be great to hear any comments from authors and the staff of ExtJS... Can you comment it?

  2. #2
    Sencha Premium User SebTardif's Avatar
    Join Date
    Feb 2011
    Location
    Cambridge, MA
    Posts
    1,295
    Answers
    16

  3. #3
    Sencha Premium Member bambam's Avatar
    Join Date
    Dec 2012
    Location
    Moscow
    Posts
    81

    Default

    @SebTardif,
    well, as I could understand you asked what I wrote in my post.(i mean i answered for your question 'via' my questions)) ) And Evant answered the same - it's a private cfg and not intended to use by customers!
    But despite this they (sencha) wrote in docs that you can use it (on my screenshot).
    So I haven't question about how to use it. As I mentioned in (3) - this cfg hasn't been used in framework at all. (though it may be used somewhere in dynamically generated JS... these threads i won't research...)
    In my application I simply overrided some methods to check blank values and forget about released version of Framework...
    I posted it only if sencha team maybe, one day will read it and it will be actual for them. (so it wasn't hard to me to write)
    After 5 years of working with ExtJS I already know that it's much easier to fix something in framework by myself than talk about it and searching info on the web or in forum...

  4. #4
    Sencha Premium User SebTardif's Avatar
    Join Date
    Feb 2011
    Location
    Cambridge, MA
    Posts
    1,295
    Answers
    16

    Default

    Quote Originally Posted by bambam View Post
    Ext.data.field.Field has got allowBlank property, but it's private. Despite that at documentation there is guide to use this property to setup not nullable reference:
    That doc bug is now tracked by EXTJS-23188

  5. #5
    Ext JS Premium Member
    Join Date
    May 2008
    Location
    Austria, Vienna
    Posts
    265

    Default

    Any update on the bug?

Similar Threads

  1. Replies: 3
    Last Post: 9 Feb 2015, 1:06 PM
  2. Ext.data.field.Field reference allowBlank
    By mattjenkins in forum Ext 5: Q&A
    Replies: 1
    Last Post: 16 Jan 2015, 10:12 AM
  3. [CLOSED] [5.0.0.970] Field.allowBlank doesn't affect Model.isValid
    By twasink in forum Ext 5: Bugs
    Replies: 1
    Last Post: 31 Jul 2014, 11:59 PM
  4. [CLOSED] Model Validation: Presence is not allowBlank=false
    By vivid-planet in forum Ext 5: Bugs
    Replies: 2
    Last Post: 21 Jul 2014, 2:20 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
  •