Skip to content

Commit

Permalink
Merge pull request #19 from alanjames1987/master
Browse files Browse the repository at this point in the history
Adds AMD support.
  • Loading branch information
Gábor Molnár committed Nov 9, 2014
2 parents f73b4e2 + 7085591 commit f4d8132
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
8 changes: 7 additions & 1 deletion js-schema.debug.js
Original file line number Diff line number Diff line change
Expand Up @@ -910,7 +910,7 @@ var OrSchema = module.exports = Schema.patterns.OrSchema = Schema.extend({
}
})
if (errors.length > 0) {
return errors.join(' OR ')
return errors.join(' AND ')
}
}
return false
Expand Down Expand Up @@ -1117,4 +1117,10 @@ schema.fromJSON = function(sch) {
return Schema.fromJSON(sch).wrap()
}

// define js-schema using AMD
if (typeof define === 'function' && define.amd) {
define([], function(){
return schema;
});
}
},{"./BaseSchema":2}]},{},[1]);
Loading

0 comments on commit f4d8132

Please sign in to comment.