Kaydet (Commit) f271e089 authored tarafından Russell Keith-Magee's avatar Russell Keith-Magee

Fixed #2841 -- Clarified documentation on procedure for field validation.…

Fixed #2841 -- Clarified documentation on procedure for field validation. Thanks, dave@avaragado.org.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@4886 bcc190cf-cafb-0310-a4f2-bffc1f526a37
üst 9191fa1f
...@@ -517,10 +517,10 @@ to put punctuation at the end of your validation messages. ...@@ -517,10 +517,10 @@ to put punctuation at the end of your validation messages.
When are validators called? When are validators called?
--------------------------- ---------------------------
After a form has been submitted, Django first checks to see that all the After a form has been submitted, Django validates each field in turn. First,
required fields are present and non-empty. For each field that passes that if the field is required, Django checks that it is present and non-empty. Then,
test *and if the form submission contained data* for that field, all the if that test passes *and the form submission contained data* for that field, all
validators for that field are called in turn. The emphasized portion in the the validators for that field are called in turn. The emphasized portion in the
last sentence is important: if a form field is not submitted (because it last sentence is important: if a form field is not submitted (because it
contains no data -- which is normal HTML behavior), the validators are not contains no data -- which is normal HTML behavior), the validators are not
run against the field. run against the field.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment