lykmapipo / sails-hook-validation

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

Not returning custom errors with Sails 0.12.9 #49

Open boycce opened 7 years ago

boycce commented 7 years ago

Hey, I recently upgraded to Sails 0.12.9 but now it seems it's just returning the original error messages when using model.validate.

chungledna commented 7 years ago

Hi @Boycce Are you push comment code in language file? Ex: //Authentication message "authentication.email.requered": "Hallu " I got same issue when I push the comment in file /locale/en.json and it work well when I remove the comment in en.json file.

asergey87 commented 7 years ago

+1 When i call User.validate(userObject) it is doesn't work

armellarcier commented 7 years ago

@chungledna is it not the default locale that changed? What locale are you usually supporting?

armellarcier commented 7 years ago

We need more info on this issue. I can't reproduce it. Seems to me it should be closed unless hinted otherwise soon enough.