Success! Looks like we've fixed this one. According to our records the fix was applied for DSGNR-3903 in a recent build.
  1. #1
    Sencha User loiane's Avatar
    Join Date
    Aug 2009
    Posts
    181
    Vote Rating
    51
    loiane is a jewel in the rough loiane is a jewel in the rough loiane is a jewel in the rough

      0  

    Default Missing matcher config for Model Validations

    Missing matcher config for Model Validations


    Hi,

    Sencha Architect is missing a config called matcher when you add a validation of type 'format' into a Model.
    This config should have 'object' as a type.

    The good thing is that there is a workaround (you can add the config by yourself) but this can lead into errors, specially if people that are getting started with the framework starts using the tool.

    Attached are 2 screenshots.

    Doc link: http://docs.sencha.com/touch/2-1/#!/api/Ext.data.Validations-method-format

    Screen Shot 2012-12-11 at 8.20.41 PM.pngScreen Shot 2012-12-11 at 8.20.28 PM.png
    Sencha/Java evangelist
    Author of ExtJS 4 First Look and Mastering Ext JS books
    English blog: http://loianegroner.com
    Portuguese blog: http://loiane.com
    Sencha Examples: https://github.com/loiane

  2. #2
    Sencha User
    Join Date
    Dec 2011
    Location
    México
    Posts
    11
    Vote Rating
    0
    oresistemas is on a distinguished road

      0  

    Default Use the matcher as an object

    Use the matcher as an object


    You can try to use the matcher as an object and put the value of the object between slashs ("/"), for example:

    /^[-]?[0-9]*[.]{0,1}[0-9]*$/

    In my case this results in:
    {
    type: 'format',
    message: 'Format error',
    matcher: /^[-]?[0-9]*[.]{0,1}[0-9]*$/,
    field: 'field01'
    }


    I hope this can help you.

Thread Participants: 1