Success! Looks like we've fixed this one. According to our records the fix was applied for
EXTJS-26437
in
6.5.3.
-
[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}
*/
-
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 */ }
-
Sencha - Product Team
Thanks for the report! I have opened a bug in our bug tracker.