Hey, after installing the hook and adding the basic necessities(non i18n) into my model described in the readme, I am getting an error when creating a new user. Using sails 0.11.5sails-hook-validation 0.4.5
Error
i18n:warn WARN: Locale en couldn't be read - check the context of the call to $__. Using en (default) as current locale +0ms.
node_modules\sails\node_modules\i18n\i18n.js:503
return locales[locale][singular];
^
TypeError: Cannot read property 'user.email.unique' of undefined
my model:
attributes: {
email: {
type: 'email',
required: true,
unique: true
}
},
validationMessages: {
email: {
required: 'An email is required.',
email: 'Provide a valid email address.',
unique: 'The email address entered is already being used.'
}
}
Figured it. Looks like if you are not intending to use i18n, you still need to have the locales folder intact with the correct path inside config/i18n i.e:
Hey, after installing the hook and adding the basic necessities(non i18n) into my model described in the readme, I am getting an error when creating a new user. Using
sails 0.11.5
sails-hook-validation 0.4.5
Error
my model: