Skip to content

Commit

Permalink
Add comment about "required" boolean form
Browse files Browse the repository at this point in the history
  • Loading branch information
awwright committed Jan 26, 2017
1 parent 9612c13 commit b4f6fce
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/attribute.js
Expand Up @@ -476,6 +476,7 @@ validators.multipleOf = function validateMultipleOf (instance, schema, options,
validators.required = function validateRequired (instance, schema, options, ctx) {
var result = new ValidatorResult(instance, schema, options, ctx);
if (instance === undefined && schema.required === true) {
// A boolean form is implemented for reverse-compatability with schemas written against older drafts
result.addError({
name: 'required',
message: "is required"
Expand Down

0 comments on commit b4f6fce

Please sign in to comment.