Closed GaetanRouzies closed 3 years ago
For the second part of my problem, i was importing check the wrong way.
import check from 'meteor/check';
Should be:
import { check } from 'meteor/check';
Then it satisfy audit-argument-checks
I have a similar issue, read somewhere that despite documentation, the only supported schema extensions was in the meta field.
I was using only aldeed:simple-schema, but then i wanted to use collection2. When i installed aldeed:collection2 and the npm package simpl-schema, my checks using SimpleSchema stopped working and now show the following error:
Check() works with aldeed:simple-schema but not with simpl-schema. Is it normal ?
My Meteor Method
I looked inside the simpl-schema doc and i tried another validation method. Adding the parameter check as a second argument of my SimpleSchema and using
mySchema.validate()
But this code supposing to satisfy
audit-argument-checks
doesn't work cause it throws the following error:Any idea how i could use check with collection2 and simpl-schema ? Thanks for your answer