apostrophe-schemas
Advanced tools
Comparing version 0.4.0 to 0.4.1
{ | ||
"name": "apostrophe-schemas", | ||
"version": "0.4.0", | ||
"version": "0.4.1", | ||
"description": "Schemas for easy editing of properties in Apostrophe objects", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -166,3 +166,6 @@ function AposSchemas() { | ||
data[name] = self.getAreaJSON($el, name); | ||
if (field.required && !(data[name].items && data[name].items.length)) { | ||
// TODO: this is very lazy and doesn't bother to look for things | ||
// like widgets with nothing in them. We should think seriously about | ||
// server side validation at this point. | ||
if (field.required && (data[name] === '[]')) { | ||
return 'required'; | ||
@@ -173,3 +176,3 @@ } | ||
data[name] = self.getSingletonJSON($el, name); | ||
if (field.required && !(data[name].items && data[name].items.length)) { | ||
if (field.required && (data[name] === '[]')) { | ||
return 'required'; | ||
@@ -176,0 +179,0 @@ } |
70982
884