validationerror django params

Solutions on MaxInterview for validationerror django params by the best coders in the world

showing results for - "validationerror django params"
Katniss
30 Apr 2020
1raise ValidationError(
2    _('Invalid value: %(value)s'),
3    code='invalid',
4    params={'value': '42'},
5)
6
7# Multiple validation errors
8raise ValidationError([
9    ValidationError(_('Error 1'), code='error1'),
10    ValidationError(_('Error 2'), code='error2'),
11])
12