Results 1 to 3 of 3

Thread: [modern, 6.5.2] broken link "Ext.data.validator" @docs for Ext.field.Field.validator

    Success! Looks like we've fixed this one. According to our records the fix was applied for EXTJS-26437 in 6.5.3.
  1. #1
    Sencha Premium Member valio's Avatar
    Join Date
    Jan 2014
    Posts
    196
    Answers
    8
    Vote Rating
    22
      0  

    Default [modern, 6.5.2] broken link "Ext.data.validator" @docs for Ext.field.Field.validator

    The link for the isValid-method is broken at http://docs.sencha.com/extjs/6.5.2/m...cfg-validators

    If I am not mistaken the corresponding doc comment should be
    /**
    * @cfg {Mixed}
    * A validator or array of validators to be applied to the field.
    *
    * When the field is validated, each validator is applied and if any one of them
    * determines the field is invalid, the field will be marked as invalid. If you
    * examine the field's validators, you will get an array of Ext.data.Validators.
    *
    * Validation currently is synchronous. If you need to validate a field with interaction
    * with a server, you would do this when the form is submitted.
    *
    * A validator may be:
    *
    * * A regexp - if the field fails to match the regexp, it is invalid.
    * * A function - the function will be called to validate the field; it should return false if invalid.`
    * * An object - an object with a member fn that is a function to be called to validate the field.
    * * An instantiated Validator {@link Ext.data.validator.Validator}
    */
    instead of
    /**
    * @cfg {Mixed}
    * A validator or array of validators to be applied to the field.
    *
    * When the field is validated, each validator is applied and if any one of them
    * determines the field is invalid, the field will be marked as invalid. If you
    * examine the field's validators, you will get an array of Ext.data.Validators.
    *
    * Validation currently is synchronous. If you need to validate a field with interaction
    * with a server, you would do this when the form is submitted.
    *
    * A validator may be:
    *
    * * A regexp - if the field fails to match the regexp, it is invalid.
    * * A function - the function will be called to validate the field; it should return false if invalid.`
    * * An object - an object with a member fn that is a function to be called to validate the field.
    * * An instantiated Validator {@link Ext.data.validator}
    */

  2. #2
    Sencha Premium Member valio's Avatar
    Join Date
    Jan 2014
    Posts
    196
    Answers
    8
    Vote Rating
    22
      0  

    Default

    Furthermore it would be nice if an example would be provided for the object.

    It's not clear why it could be preferable to call setValidators with an object like
    Code:
    { fn: ()=>{ /* validator code */ } }
    instead of just a function
    Code:
    ()=>{ /* validator code */ }

  3. #3
    Sencha - Product Team
    Join Date
    Apr 2015
    Posts
    94
    Answers
    20
    Vote Rating
    7
      0  

    Default

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

Similar Threads

  1. Replies: 0
    Last Post: 1 Oct 2017, 11:34 PM
  2. Replies: 4
    Last Post: 10 Feb 2016, 8:31 AM
  3. Replies: 0
    Last Post: 8 Sep 2015, 9:11 AM
  4. Replies: 2
    Last Post: 6 Feb 2015, 6:43 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •