I saw that the beforeValidation is called for both create and update so I'm thinking of using this callback to manipulate the posted data before saving to the database but it seems like beforeValidation is not being called because _csrf is being save in the database and the name is not slugified.
Example:
var slugify = require('slug');
.....
beforeValidation: function(values, next){
// don't save _csrf token in database
if(values._csrf) delete values._csrf;
// slugify the name before saving in the database
values.name = slugify(values.name);
next();
}
Thanks