Skip to content

Commit

Permalink
added nullable && null type should be validation
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark committed Jul 20, 2017
1 parent d57f3b3 commit 3f7c528
Show file tree
Hide file tree
Showing 4 changed files with 202 additions and 108 deletions.
3 changes: 2 additions & 1 deletion src/Raw/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
'use strict';

const moment = require('moment');
const _ = require('lodash');

/**
* list of creepy regex, no they work nice
Expand Down Expand Up @@ -243,7 +244,7 @@ Raw.empty = function (input) {
case 'object' :
return Object.keys(input).length === 0;
case 'string' :
return input.length === 0;
return (_.trim(input)).length === 0;
}
};

Expand Down
Loading

0 comments on commit 3f7c528

Please sign in to comment.