From 4d66734cc3d525082a6865adae96809a50869282 Mon Sep 17 00:00:00 2001 From: Scott Bedard Date: Fri, 9 Jan 2015 19:25:01 -0500 Subject: [PATCH] Update october.inspector.js Reused validationMessage, and now allowing for string zero --- modules/backend/assets/js/october.inspector.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/backend/assets/js/october.inspector.js b/modules/backend/assets/js/october.inspector.js index e9753a966..a238e1bf0 100644 --- a/modules/backend/assets/js/october.inspector.js +++ b/modules/backend/assets/js/october.inspector.js @@ -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