Fixed typos in docs/ref/forms/validation.txt.
This commit is contained in:
parent
cd0ceaa102
commit
66f5aa9fa5
|
@ -36,7 +36,7 @@ overridden:
|
||||||
``ValidationError``.
|
``ValidationError``.
|
||||||
|
|
||||||
* The ``validate()`` method on a Field handles field-specific validation
|
* The ``validate()`` method on a Field handles field-specific validation
|
||||||
that is not suitable for a validator, It takes a value that has been
|
that is not suitable for a validator. It takes a value that has been
|
||||||
coerced to correct datatype and raises ``ValidationError`` on any error.
|
coerced to correct datatype and raises ``ValidationError`` on any error.
|
||||||
This method does not return anything and shouldn't alter the value. You
|
This method does not return anything and shouldn't alter the value. You
|
||||||
should override it to handle validation logic that you can't or don't
|
should override it to handle validation logic that you can't or don't
|
||||||
|
@ -257,7 +257,7 @@ available and for an example of how to write a validator.
|
||||||
Form field default cleaning
|
Form field default cleaning
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
Let's firstly create a custom form field that validates its input is a string
|
Let's first create a custom form field that validates its input is a string
|
||||||
containing comma-separated email addresses. The full class looks like this::
|
containing comma-separated email addresses. The full class looks like this::
|
||||||
|
|
||||||
from django import forms
|
from django import forms
|
||||||
|
|
Loading…
Reference in New Issue