Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error with SimpleSchema and Collection2 #62

Open
inromualdo opened this issue Nov 30, 2016 · 3 comments
Open

Error with SimpleSchema and Collection2 #62

inromualdo opened this issue Nov 30, 2016 · 3 comments

Comments

@inromualdo
Copy link

inromualdo commented Nov 30, 2016

I can not handle error ...

SimpleSchema.messages({
  "notFound": "La facture n'existe pas",
});

schema= new SimpleSchema({
  b:{
    type:String,
    custom:'function(){
   return "notFound" 
   }
})

I can not handle error notFound, it juste display in console.

@JackAdams
Copy link
Owner

Yes. Sorry. This package's support for SimpleSchema is sketchy at best.

@inromualdo
Copy link
Author

Okay. So before transaction i must check the schema?

@JackAdams
Copy link
Owner

JackAdams commented Jan 12, 2017

No, the schema should automatically be checked, whether the update is made inside a transaction or not. Either way an error should be thrown if the update doesn't pass validation.

Here is an app that use transactions and simple-schema.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants