Commit Graph

40 Commits

Author SHA1 Message Date
Vladimir Kasatkin
ff5f647df0
Fix example of requires_context attribute (#8952) 2023-05-31 10:36:21 +06:00
Maxwell Muoto
0d6ef034d2
Implement __eq__ for validators (#8925)
* Implement equality operator and add test coverage

* Add documentation on implementation
2023-04-09 14:53:47 +06:00
Asif Saif Uddin
b3d2753308
Revert "Fix bug in validators documentation (#8779)" (#8811)
This reverts commit 614bd87b60.
2023-01-03 17:59:36 +06:00
Floris Hoogenboom
614bd87b60
Fix bug in validators documentation (#8779)
Function validators seem to have to return their value (which will become part of `validated_data`) as part of their signature.
2022-12-01 22:13:14 +06:00
Francisco Couzo
041b88f8bb
Improve style, fix some typos (#8405)
* Improve style, fix some typos

* Update docs/api-guide/fields.md

Co-authored-by: Tom Christie <tom@tomchristie.com>

Co-authored-by: Tom Christie <tom@tomchristie.com>
2022-10-19 11:20:11 +01:00
Mark
c5d9144aef
fix typo (#8122)
Co-authored-by: mgold <mgold@iponweb.net>
2021-08-11 11:30:09 +01:00
johnthagen
fccfdd21c0
Remove object inheritance in docs (#7332) 2020-05-13 17:54:46 -07:00
Tom Christie
070cff5a03
Drop set_context() (#7062)
* Do not persist the context in validators

Fixes encode/django-rest-framework#5760

* Drop set_context() in favour of 'requires_context = True'
2019-12-03 11:16:27 +00:00
napsterv
7a3b7d2001 Fixed method signature in docs (#6931) 2019-09-16 10:47:29 -07:00
Ryan P Kilby
bcf196d0ac
Remove outdated note about read_only+default (#6847) 2019-07-29 15:10:57 -07:00
Luke Plant
f0dbf0a264 Update docs to use lists instead of tuples (#6797) 2019-07-12 18:15:36 -07:00
Ryan P Kilby
82c2b5c3e7
Update mkdocs (#6769) 2019-06-30 19:04:36 -07:00
vu3jej
1c976f2ac8 Fix typo in docs (#6628) 2019-05-01 15:24:38 -07:00
Jithesh Eriyakkadan Janardhanan
908236a576 Correct misspelled class name 2019-04-30 18:01:17 +05:30
Jon Dufresne
878f9d2783 Prefer https:// for URLs when available throughout project (#6208) 2018-10-02 08:28:58 +02:00
Xavier Ordoquy
489d3415ab required extra argument should be a boolean, not a string. (fixes #5906) 2018-03-28 12:39:18 +02:00
Carlton Gibson
c2b24f83a3
Alter read_only+default behaviour (#5886)
* Always exclude read_only fields from _writable_fields

* Remove `read_only` from `CreateOnlyDefault` example.
      In this context (without mentioning `save`) now slightly misleading.
2018-03-20 21:09:31 +01:00
Jon Dufresne
f9c67f04d4 Clean up all whitespace throughout project (#5578)
* Remove trailing whitespace from lines
* Remove trailing nad leading whitespace from files

Allows for cleaner diffs in future changes. For editors that
automatically clean up whitespace on save, will avoid unrelated line
changes in diffs.
2017-11-09 20:57:53 +01:00
Xavier Ordoquy
22578525ef Documentation update (#4717) 2016-11-30 12:58:34 +00:00
Nik Nyby
abc62afddb docs typo fix (#4701)
Remove unnecessary "a"
2016-11-24 09:39:18 +00:00
Nik Nyby
eaec60ae1d docs: grammar fix - it's -> its (#4698) 2016-11-23 16:10:39 +00:00
Nik Nyby
a13b8d5560 docs: grammar fix 2016-11-23 10:13:03 -05:00
Aaron Lelevier
0b9304014d Add documentation link for single 'field-level validation' to the Validator docs page (#3772) (#4657) 2016-11-07 11:30:46 +00:00
Rowan Seymour
883efbc19f Case insensitive uniqueness validation (#4534) 2016-10-04 13:44:50 +01:00
Corentin Smith
54096dc22f Add imports in validators docs (#4355) 2016-08-04 22:06:35 +01:00
Kenneth Schnall
ff5cfe3e84 Replace "class based views" occurrences with "class-based views" (#4251) 2016-07-08 08:38:50 +01:00
Ken Lewerentz
57122f0422 Added missing colon in extra_kwargs documentation 2016-06-25 22:05:28 +07:00
Tom Christie
c3b7fba918 Exclude read_only=True fields from unique_together validation & add docs. (#4192)
* Exclude read_only=True fields from unique_together validation
* Test to ensure that unique_together validators can be removed
* Do not add uniquness_extra_kwargs when validators are explicitly declared.
* Add docs on validation in complex cases
2016-06-13 13:31:12 +01:00
Alasdair Nicol
061cc5a42b Fixed #2900 -- Made example validator class in docs inherit from object 2015-06-30 16:33:01 +01:00
Marc
9d624d5b6b Update validators.md
Missing colon.
2015-05-29 16:57:13 +02:00
Cody Scott
cbf17a5ffe Specifying module for CurrentUserDefault()
Prevents having to lookup the import
2015-04-20 19:14:58 -04:00
José Padilla
d12de927ad Remove docs for 3.0 banners 2015-03-07 10:49:56 -04:00
Tom Christie
555c450497 Add missing 'validators.py' link. Closes #2166. 2014-12-01 14:46:47 +00:00
Tom Christie
8e549a76ea Add 2.x notes and links 2014-11-28 14:26:03 +00:00
Tom Christie
0f508c5821 Docs for advanced default argument usage. Closes #1945 2014-11-17 18:36:32 +00:00
Tom Christie
fd7db776ad Bring UniqueValidator implementation in line with other uniquness validators. 2014-11-10 12:32:03 +00:00
Tom Christie
f387cd89da Uniqueness constraints imply a forced 'required=True'. Refs #1945 2014-11-10 12:21:27 +00:00
Tom Christie
254701230d Fix up validators docs 2014-10-31 13:58:40 +00:00
Tom Christie
2762205887 Validator documentation and tweaks 2014-10-31 13:47:36 +00:00
Tom Christie
babdc78e61 Typo 2014-10-09 11:39:01 +01:00