diff options
| author | Bertrand Bordage <bordage.bertrand@gmail.com> | 2015-02-14 15:20:43 +0100 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2015-03-25 18:49:59 -0400 |
| commit | 3e64f3d0fc285080b42b78b67565b6ed939f9a24 (patch) | |
| tree | 16667272f441e98d35877c7e4357adc5ba276386 /docs/ref/validators.txt | |
| parent | f4cc0c40a85a8cbba6d2e4cd3158070dfd8645a2 (diff) | |
Fixed #24531 -- Improved CommaSeparatedIntegerField validation.
`','`, `'1,,1'`, `',1'` etc. are no longer considered as valid
comma-separated integer lists.
Diffstat (limited to 'docs/ref/validators.txt')
| -rw-r--r-- | docs/ref/validators.txt | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/docs/ref/validators.txt b/docs/ref/validators.txt index cf078bee21..c297209b03 100644 --- a/docs/ref/validators.txt +++ b/docs/ref/validators.txt @@ -214,6 +214,16 @@ to, or in lieu of custom ``field.clean()`` methods. A :class:`RegexValidator` instance that ensures a value is a comma-separated list of integers. +``int_list_validator`` +---------------------- + +.. function:: int_list_validator(sep=',', message=None, code='invalid') + + .. versionadded:: 1.9 + + Returns a :class:`RegexValidator` instance that ensures a string + consists of integers separated by ``sep``. + ``MaxValueValidator`` --------------------- |
