Comparing version 0.0.50 to 0.0.51
@@ -104,5 +104,5 @@ var widgets = require('./widgets'), | ||
{ | ||
if(this.value == '') | ||
if(this.value === '') | ||
this.value = null; | ||
if((this.value == null || this.value == []) && this.required) | ||
if((this.value === null || this.value === []) && this.required) | ||
this.errors.push('this field is required'); | ||
@@ -221,3 +221,3 @@ for(var i=0; i<this.validators; i++) | ||
// this.value = null || this['default']; | ||
if(this.value == '') | ||
if(this.value === '') | ||
this.value = null; | ||
@@ -274,3 +274,3 @@ this._super(req,callback); | ||
{ | ||
if(this.value === null && this.value == '' && !this.required) | ||
if(this.value === null && this.value === '' && !this.required) | ||
this.value = null; | ||
@@ -277,0 +277,0 @@ else |
{ | ||
"name": "j-forms", | ||
"description": "jewish forms creation from fields or from mongoose models", | ||
"version": "0.0.50", | ||
"version": "0.0.51", | ||
"author": "Ishai Jaffe <ishai@empeeric.com>", | ||
@@ -6,0 +6,0 @@ "dependencies": { |
2442038