lykmapipo / sails-hook-validation

Custom validation error messages for sails model with i18n support
104 stars 29 forks source link

Does not work with sails-hook-autoreload #37

Open rvanzon opened 8 years ago

rvanzon commented 8 years ago

Hi,

I am trying to use sails-hook-validation with sails-hook-autoreload. But after code is changed, and sails-hook-autoreload reloads the controllers no validation-errors are returned (the errors array is null). Should this work?

lykmapipo commented 8 years ago

@rvanzon

Does sails-hook-autoreload have ability to reload the whole app?. If so then sails-hook-validation will have to work.

Am open to discussion

rvanzon commented 8 years ago

@lykmapipo it reloads parts manually: https://github.com/sgress454/sails-hook-autoreload/blob/master/index.js#L76

But I have the idea sails-hook-validation is not the problem, but Sails or Waterline itself, or maybe it's driver related. I spend some hours figuring out, but I can't find it :-(