Skip to content

Commit e7b46a2

Browse files
committed
Get form Id for validation context
1 parent 823bb12 commit e7b46a2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/client/fileUpload.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ Template.afFileUpload.events({
148148
const upload = template.collection.insert(opts, false);
149149
let ctx;
150150
try {
151-
ctx = AutoForm.getValidationContext(template.formId);
151+
ctx = AutoForm.getValidationContext($(e.target).closest("form").attr('id'));
152152
} catch (exception) {
153153
// Fix: "TypeError: Cannot read property '_resolvedSchema' of undefined"
154154
ctx = AutoForm.getValidationContext();

0 commit comments

Comments
 (0)