Closed isery closed 9 years ago
this is bug for me. invalid attributes return in camelCase.
invalidAttributes { shareTo:
[ { rule: 'in',
message: '"in" validation rule failed for input: } ] }
My model
shareTo: {
type: 'string',
columnName: 'share_to',
enum: ['public', 'followers', 'custom'],
defaultsTo: 'public'
},
im using sails-mysql
Hey,
I realized that when you declare a columnName in the models attribute, the validation doesn't work because the sails validation error will return the columnName as key in the object.
I couldn't make a test because you need a database for this. Without a database the columnName will be ignored.
You can test it if you install postgres + sails-postgres, add connection to the test bootstrap and add property columnName: email_address to the user model.