summaryrefslogtreecommitdiff
path: root/django/core/validators.py
AgeCommit message (Collapse)Author
2017-03-21[1.11.x] Fixed #27945 -- Clarified that RegexValidator searches with the regex.seanfagan
Backport of 325db2a8c3453a56db5e0df0eed37476eb67802d from master
2017-01-25[1.11.x] Removed unused variables that are overwritten.Mads Jensen
Backport of ebf34c3cdcd2c75349c60a064427ac255958bf9b from master
2016-11-14Fixed E305 flake8 warnings.Ramin Farajpour Cami
2016-10-28Fixed #26578 -- Prohibited non-ASCII digits in validate_ipv4_address.wim glenn
2016-09-17Refs #27025 -- Fixed "invalid escape sequence" warnings in Python 3.6.Tim Graham
http://bugs.python.org/issue27364
2016-06-30Fixed #21548 -- Added FileExtensionValidator and validate_image_file_extension.Berker Peksag
2016-06-28Fixed #26119 -- Fixed URLValidator crash on URLs with brackets.Christopher Grebs
2016-04-04Fixed W503 flake8 warnings.Tim Graham
2016-02-18Fixed #26204 -- Reallowed dashes in top-level domains for URLValidator.Tim Graham
Thanks Shai Berger for the review.
2016-02-18Fixed #26107 -- Added option to int_list_validator() to allow negative integers.Akshesh
2016-01-25Fixed #26125 -- Fixed E731 flake warnings.userimack
2015-12-08Fixed #25637 -- Added URLValidator hostname length validation.Raphael Michel
URLValidator now validates the maximum length of a hostname and the maximum length of all labels inside the hostname.
2015-10-31Fixed #25635 -- Made URLValidator allow '+' in scheme.Dheerendra Rathor
2015-10-29Fixed #25620 -- Made URLValidator prohibit URLs with consecutive dots in the ↵Dheerendra Rathor
domain section.
2015-09-18Fixed #24636 -- Added model field validation for decimal places and max digits.Iulia Chiriac
2015-08-28Fixed #25322 -- Lazily compiled core.validators regular expressions.Jonas Haag
This speeds up import of 'django.core.validators' which can save a few hundred milliseconds when importing the module for the first time. It can be a significant speedup to the django-admin command.
2015-07-17Fixed #16501 -- Added an allow_unicode parameter to SlugField.Edward Henderson
Thanks Flavio Curella and Berker Peksag for the initial patch.
2015-07-08Fixed catastrophic backtracking in URLValidator.Shai Berger
Thanks João Silva for reporting the problem and Tim Graham for finding the problematic RE and for review. This is a security fix; disclosure to follow shortly.
2015-07-08Prevented newlines from being accepted in some validators.Tim Graham
This is a security fix; disclosure to follow shortly. Thanks to Sjoerd Job Postmus for the report and draft patch.
2015-07-06Fixed #25059 -- Allowed Punycode TLDs in URLValidatorAlexey Sveshnikov
2015-04-17Fixed #24349 -- Limited domain name labels to 63 characters in EmailValidatorAnoop Thomas Mathew
2015-03-25Fixed #24531 -- Improved CommaSeparatedIntegerField validation.Bertrand Bordage
`','`, `'1,,1'`, `',1'` etc. are no longer considered as valid comma-separated integer lists.
2015-02-06Sorted imports with isort; refs #23860.Tim Graham
2015-01-06Fixed #20003 -- Improved and extended URLValidatorDanilo Bargen
This adds support for authentication data (`user:password`) in URLs, IPv6 addresses, and unicode domains. The test suite has been improved by adding test URLs from http://mathiasbynens.be/demo/url-regex (with a few adjustments, like allowing local and reserved IPs). The previous URL validation regex failed this test suite on 13 occasions, the validator was updated based on https://gist.github.com/dperini/729294.
2014-11-22Revert "Fixed #23892 -- Made deconstructible classes forwards compatible"Carl Meyer
This reverts commit f36151ed169813f2873e13ca9de616cfa4095321. Adding kwargs to deconstructed objects does not achieve useful forward-compatibility in general, since additional arguments are silently dropped rather than having their intended effect. In fact, it can make the failure more difficult to diagnose. Thanks Shai Berger for discussion.
2014-11-22Fixed #23892 -- Made deconstructible classes forwards compatibleCarl Meyer
2014-09-05Limited lines to 119 characters in django/Tim Graham
refs #23395.
2014-07-26Fixed #16617 -- Added 'value' to BaseValidator params.Anubhav Joshi
Also allowed overriding the default messages in subclasses of BaseValidator. Thanks sperrygrove for initial patch.
2014-07-04Corrected domain max length for EmailValidator; refs #20631.Tim Graham
Thanks MarkusH for the report.
2014-07-04Fixed #20631 -- Increased the default EmailField max_length to 254.Tim Graham
Thanks pmartin for the report.
2014-05-16Fixed #22579 -- Corrected validation for email to reject trailing slashErik Romijn
Thanks to Claude Paroz for the report and patch and Tomasz Paczkowski for the review.
2014-05-08Fixed #22588 -- Fix RegexValidator __eq__David Szotten
Compare parameters instead of re.pattern instances, and add the other parameters to the comparison. Also add a __ne__ to make assertNotEqual work properly.
2014-03-30Corrected many style guide violations that the newest version of flake8 catchesAlex Gaynor
2014-03-21Fixed #22255 -- Added support for specifying re flags in RegexValidatorDejan Noveski
2014-02-22Fixed #22123 -- EmailValidator now also accepts IPv6 literals in addressesErik Romijn
2014-02-10Fixed #20784 -- Added inverse_match parameter to RegexValidator.Si Feng
2014-01-19Fixed #21638: Validators are now comparable, stops infinite user mig'nsAndrew Godwin
2013-12-28Fixed #21242 -- Allowed more IANA schemes in URLValidatorClaude Paroz
Thanks Sascha Peilicke for the report and initial patch, and Tim Graham for the review.
2013-11-02Fixed all E261 warningscoagulant
2013-10-23Fixed #12027 -- Fixed EmailValidator to reject a trailing dot.Tim Graham
Thanks Klas H for the report and claudep for the patch.
2013-10-21Fixed #21275 -- Fixed a serializer error when generating migrations for ↵Loic Bistuer
contrib.auth. The migration serializer now looks for a deconstruct method on any object.
2013-09-05Took advantage of django.utils.six.moves.urllib.*.Aymeric Augustin
2013-07-21Fixed an email validation regressionClaude Paroz
Thanks Vincent Wagelaar for the report.
2013-06-18Fixed #20199 -- Allow ModelForm fields to override error_messages from model ↵Loic Bistuer
fields
2013-03-14Fixed #17051 -- Removed some 'invalid' field error messagesClaude Paroz
When the 'invalid' error message is set at field level, it masks the error message raised by the validator, if any.
2013-03-14Add a specific error message for URLValidatorClaude Paroz
2013-02-23Fixed errors introduced in 21f333bcefccc151d6439246f8203d609ab6ca79. Refs #17751Florian Apolloner
2013-02-23Fix #17751: Added stripping of whitespace for ↵Erik Romijn
IPAddressField/GenericIPAddressField
2013-01-30Fixed #19034 -- Added proper i18n pluralization for max/min length ↵Claude Paroz
validation messages This was made possible by commit 3f1a0c0040b9. Thanks Evil Clay for the report and Alexey Boriskin his work on the ticket.
2013-01-26Fixed validation of email addresses when the local part contains an @.Aymeric Augustin
See also BaseUserManager.normalize_email -- it uses rsplit. Refs #4833.