S
S
slickstars2015-09-22 14:38:58
Django
slickstars, 2015-09-22 14:38:58

How to change the default validator message?

Hello everyone, I have a question - how can I change the standard message of the validator - for example UniqueValidator which displays a message in English. "This field must be unique." ?
You need to change it to a Russian message, set LANGUAGE_CODE = 'ru-RU' in the settings - but this does not set the language for messages of validators and fields.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
Z
zigen, 2015-09-22
@zigen

USE_I18N = True
USE_L10N = True

LANGUAGE_CODE = 'ru-RU'

Z
zelsky, 2015-09-23
@zelsky

Look at the messages in the docks

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question