Update october.inspector.js

Reused validationMessage, and now allowing for string zero
This commit is contained in:
Scott Bedard 2015-01-09 19:25:01 -05:00
parent f628eaf666
commit 4d66734cc3
1 changed files with 2 additions and 2 deletions

View File

@ -817,8 +817,8 @@
InspectorEditorString.prototype.validate = function() {
var val = $.trim($(this.selector).val())
if (this.fieldDef.required && !val)
return this.fieldDef.requiredMessage || 'Required fields were left blank.'
if (this.fieldDef.required && val.length === 0)
return this.fieldDef.validationMessage || 'Required fields were left blank.'
if (this.fieldDef.validationPattern === undefined)
return