LT-67: Fixing nested properties validation

This commit is contained in:
Bruno Alves de Faria 2016-08-31 14:33:16 -03:00
parent c4ac8cbeef
commit 662cfe3c94

View File

@ -1,6 +1,6 @@
import { OHIF } from 'meteor/ohif:core'; import { OHIF } from 'meteor/ohif:core';
import { Template } from 'meteor/templating'; import { Template } from 'meteor/templating';
import { Tracker } from "meteor/tracker"; import { Tracker } from 'meteor/tracker';
import { _ } from 'meteor/underscore'; import { _ } from 'meteor/underscore';
import { $ } from 'meteor/jquery'; import { $ } from 'meteor/jquery';
@ -101,9 +101,9 @@ OHIF.mixins.formItem = new OHIF.Mixin({
} }
// Create the data document for validation // Create the data document for validation
const document = { const document = OHIF.blaze.getNestedObject({
[key]: component.value() [key]: component.value()
}; });
// Check if the document validation failed // Check if the document validation failed
if (!schema.validateOne(document, key)) { if (!schema.validateOne(document, key)) {