All the error messages return from django default validators ends with a dot (.). Is there anyway to remove that last dot from all messages globally.
Or, If someone help me to find a way to catch these error returning function, I can trim the last dot if exists in that section.
Sample error messages.
{
"email": [
"This field may not be blank."
]
}
{
"email": [
"Enter a valid email address."
]
}
If you want to change all of them, you should override the field's default messages somewhere in the application initialization:
serializers.CharField.default_error_messages['blank'] = 'This field may not be blank'
For example, the blank message can be found here