diff --git a/lib/validations.js b/lib/validations.js index b66c99c5..9d642e28 100644 --- a/lib/validations.js +++ b/lib/validations.js @@ -170,8 +170,10 @@ Validatable.validatesFormatOf = getConfigurator('format'); * user.name = 'bad'; * user.isValid(); // false * - * @nocode - * @see helper/validateCustom + * @param {String} propertyName Property name to validate. + * @param {Function} validatorFn Custom validation function. + * @options {Object} Options See below. + * @property {String} message Optional error message if property is not valid. Default error message: " is invalid". */ Validatable.validate = getConfigurator('custom'); @@ -200,9 +202,9 @@ Validatable.validate = getConfigurator('custom'); * isValid; // false * }) *``` - * @async - * @nocode - * @see helper/validateCustom + * @param {String} propertyName Property name to validate. + * @options {Object} Options See below + * @property {String} message Optional error message if property is not valid. Default error message: " is invalid". */ Validatable.validateAsync = getConfigurator('custom', {async: true});