diff --git a/lib/validations.js b/lib/validations.js index 7e57533c..94246972 100644 --- a/lib/validations.js +++ b/lib/validations.js @@ -127,9 +127,11 @@ Validatable.validatesNumericalityOf = getConfigurator('numericality'); * ``` * * @param {String} propertyName Property name to validate. - * @options {Object} Options + * @options {Object} Options See below. * @property {Array} inArray Property must match one of the values in the array to be valid. - * @property {String} message Optional error message if property is not valid. Default error message: "is not included in the list". + * @property {String} message Optional error message if property is not valid. + * Default error message: "is not included in the list". + * @property {Boolean} allowNull Whether null values are allowed. */ Validatable.validatesInclusionOf = getConfigurator('inclusion'); @@ -142,6 +144,7 @@ Validatable.validatesInclusionOf = getConfigurator('inclusion'); * @options {Object} Options * @property {Array} inArray Property must match one of the values in the array to be valid. * @property {String} message Optional error message if property is not valid. Default error message: "is reserved". + * @property {Boolean} allowNull Whether null values are allowed. */ Validatable.validatesExclusionOf = getConfigurator('exclusion'); @@ -155,6 +158,7 @@ Validatable.validatesExclusionOf = getConfigurator('exclusion'); * @options {Object} Options * @property {RegExp} with Regular expression to validate format. * @property {String} message Optional error message if property is not valid. Default error message: " is invalid". + * @property {Boolean} allowNull Whether null values are allowed. */ Validatable.validatesFormatOf = getConfigurator('format'); @@ -176,6 +180,7 @@ Validatable.validatesFormatOf = getConfigurator('format'); * @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". + * @property {Boolean} allowNull Whether null values are allowed. */ Validatable.validate = getConfigurator('custom'); @@ -205,8 +210,9 @@ Validatable.validate = getConfigurator('custom'); *``` * @param {String} propertyName Property name to validate. * @param {Function} validatorFn Custom validation function. - * @options {Object} Options See below + * @options {Object} Options See below. * @property {String} message Optional error message if property is not valid. Default error message: " is invalid". + * @property {Boolean} allowNull Whether null values are allowed. */ Validatable.validateAsync = getConfigurator('custom', { async: true }); @@ -231,6 +237,7 @@ Validatable.validateAsync = getConfigurator('custom', { async: true }); * @property {RegExp} with Regular expression to validate format. * @property {Array.} scopedTo List of properties defining the scope. * @property {String} message Optional error message if property is not valid. Default error message: "is not unique". + * @property {Boolean} allowNull Whether null values are allowed. */ Validatable.validatesUniquenessOf = getConfigurator('uniqueness', { async: true });