Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

validationerror django params

raise ValidationError(
    _('Invalid value: %(value)s'),
    code='invalid',
    params={'value': '42'},
)

# Multiple validation errors
raise ValidationError([
    ValidationError(_('Error 1'), code='error1'),
    ValidationError(_('Error 2'), code='error2'),
])
Source by docs.djangoproject.com #
 
PREVIOUS NEXT
Tagged: #validationerror #django #params
ADD COMMENT
Topic
Name
8+6 =