Permalink
Browse files

Merge pull request #43 from lgomezma/master

Fix present validation check
  • Loading branch information...
2 parents 8db4514 + f24e509 commit 199f82b797db514dd13cd29297cbc80061083162 @mde mde committed Mar 23, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/validators.js
View
@@ -33,7 +33,7 @@ var utils = require('utilities')
var validators = {
present: function (name, val, params, rule, locale) {
var msg;
- if (!val) {
+ if (typeof val === "undefined" || val=="") {
//'Field "' + name + '" is required.';
msg = rule.message || i18n.getText('model.validatesPresent',
{name: name}, locale);

0 comments on commit 199f82b

Please sign in to comment.