abp icon indicating copy to clipboard operation
abp copied to clipboard

activate location when I use data annotation

Open erojasd opened this issue 6 years ago • 5 comments

Hello,

I am working with Data Annotations"for validations in the dto. Based on what I read in the documentation, abp automatically validates and sends the location-based message, but this doesn't work for me. I checked if the localization files are in the abp project, it is Spanish to check if they actually existed and it was so. What do I have to do to activate the translations in Data annotation?

This is an example of the response when the system performs a validation. { "error": { "code": null, "message": "Su pedido no es válido!", "details": "Los siguientes errores se encontraton durante la validación.\r\n - The field NameAbbrev must be a string with a maximum length of 64.\r\n", "validationErrors": [ { "message": "The field NameAbbrev must be a string with a maximum length of 64.", "members": [ "nameAbbrev" ] } ] } }

erojasd avatar May 07 '20 22:05 erojasd

Try upgrading to ABP 2.7. I had the problem and it went away after the upgrade.

aklscv avatar May 08 '20 05:05 aklscv

Maybe it is related to this change: https://github.com/abpframework/abp/issues/3739

Are other validation attributes correctly localized?

hikalkan avatar May 10 '20 21:05 hikalkan

only occurs in validations with data annotation. I also tried to update abp to version 2.7 and the problem persists

erojasd avatar May 19 '20 12:05 erojasd

hi @erojasd Please share the steps to reproduce the problem.

maliming avatar May 20 '20 00:05 maliming

Could not repeat it. For example, it works for Portugal language:

image

Please re-open the issue if you need, but share the steps to reproduce the problem.

hikalkan avatar May 29 '20 20:05 hikalkan