0

beforeValidation() didn't invoke when the Model.create(obj) was called.

modele.exports = {
 attributes : {},
 beforeValidation : function(values, next){
  console.log("Hello I am here"); //it didn't invoke when Model.create(obj)exec(); was called
 }
}

I am using sails 0.10.0-rc4 and Waterline 0.10.0-rc3.

Thank you.

Update :

Solution : sails beforeValidation not called

Community
  • 1
  • 1
tebesfinwo
  • 715
  • 1
  • 6
  • 20
  • possible duplicate of [sails beforeValidation not called](http://stackoverflow.com/questions/22480072/sails-beforevalidation-not-called) – sgress454 Apr 07 '14 at 20:40
  • @ScottGress Thank you, you are right. I thought http://beta.sailsjs.org/#!documentation/guides/models should be synced with https://github.com/balderdashy/sails-docs/blob/master/reference/Models.md. Apparantly, they are not. – tebesfinwo Apr 07 '14 at 20:55
  • Those docs are in active development, but in general the *reference* section is synced with https://github.com/balderdashy/sails-docs/blob/master/reference/, not *guides*. – sgress454 Apr 07 '14 at 21:02

0 Answers0