How would I go about translating a validation error that is automatically generated by Django? I'm seeing that when a user attempts to add an invalid username, the Validation error is not translated. Is there a way to mark the built-in validation error for translation?
My error is currently generated by validating a Form that is generated using the built-in User
model.
class UserForm(ModelForm):
email = forms.CharField(max_length=75, required=True, label=_('Email'))
password = forms.CharField(
widget=forms.PasswordInput(), label=_('Password'))
class Meta:
model = User
fields = (
'username',
'first_name',
'last_name',
'email',
'password',
)