Permalink
Browse files

Need to unit test the simple-json-schema, and create a repository for…

… it :/
  • Loading branch information...
1 parent 2188a5e commit d794a1339e5f4877b5c1db5a15c63b6296f54e82 @pdelanauze committed Jun 12, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 js/lib/simple-json-schema.js
@@ -229,7 +229,7 @@ define(function () {
if (prop.required && (typeof value === 'undefined' || (typeof value === 'string' && value.trim().length === 0))) {
errors.push({property:key, error:sjs.messages.isRequired});
- } else {
+ } else if (typeof value !== 'undefined'){
// Run the format validator if any
var errorString = false;
if (sjs.validators[prop.format]) {

0 comments on commit d794a13

Please sign in to comment.