apostrophe-schemas
Advanced tools
Comparing version 0.5.34 to 0.5.35
{ | ||
"version": "0.5.34", | ||
"version": "0.5.35", | ||
"name": "apostrophe-schemas", | ||
@@ -4,0 +4,0 @@ "description": "Schemas for easy editing of properties in Apostrophe objects", |
@@ -43,3 +43,3 @@ function AposSchemas() { | ||
self.convertFields = function($el, schema, data, callback) { | ||
self.findSafe($el, '[data-name]').removeClass('apos-error'); | ||
self.findSafe($el, '[data-name]').removeClass('apos-error').find('.apos-error-message').remove(); | ||
var failing; | ||
@@ -65,3 +65,3 @@ | ||
if (err) { | ||
self.addError($el, field.name); | ||
self.addError($el, field.name, field.required); | ||
failing = field; | ||
@@ -608,4 +608,7 @@ } | ||
self.addError = function($el, name) { | ||
self.addError = function($el, name, required) { | ||
self.findSafe($el, '[data-name="' + name + '"]').addClass('apos-error'); | ||
if (required == true) { | ||
self.findSafe($el, '[data-name="' + name + '"]').find('label').append('<span class="apos-error-message"> * required</span>'); | ||
} | ||
}; | ||
@@ -612,0 +615,0 @@ |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
101131
1333
0