Commit graph

1440 commits

Author SHA1 Message Date
Joseph Kocherhans
0b5c67a746 [soc2009/model-validation] Merged from trunk up to [12093].
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@12094 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-05 00:39:42 +00:00
Joseph Kocherhans
a54ed5ad1e [soc2009/model-validation] Removed the ComplexValidator code in preparation for merging this branch into trunk. It will likely come back in some other form sometime after the merge.
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@12078 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-04 02:16:36 +00:00
Honza Král
556132f75b [soc2009/model-validation] removed directory accidentaly committed
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@12077 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-04 01:57:54 +00:00
Honza Král
ffd5564a87 [soc2009/model-validation] Merged to trunk at r12070
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@12073 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-04 01:06:26 +00:00
Honza Král
a7c320fea7 [soc2009/model-validation] Raise UnresolvableValidationError if an error occurs on excluded field
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@12072 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-04 00:22:13 +00:00
Joseph Kocherhans
a907e15cad [soc2009/model-validation] Renamed Model's clean method to full_validate to be more consistent with django.forms.
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@12039 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-01 21:11:57 +00:00
Joseph Kocherhans
c2a2b51ac3 [soc2009/model-validation] Cleaned up some comments and whitespace.
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@12038 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-01 20:30:17 +00:00
Honza Král
201d171d9d [soc2009/model-validation] removed some unused tests
This behavior is covered by existing form tests

git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@12020 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-29 04:05:33 +00:00
Honza Král
c4767e642a [soc2009/model-validation] Added some comments to explain why I set DEBUG in tests
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@12019 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-29 04:05:17 +00:00
Honza Král
c3e94faa23 [soc2009/model-validation] Migrated CharField to use validators
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@12018 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-29 04:04:59 +00:00
Honza Král
f911df19a4 [soc2009/model-validation] Merget to trunk at r12009
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@12014 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-28 16:35:23 +00:00
Honza Král
695de8cc91 [soc2009/model-validation] Fixed #12132: unneccessary unique_check for primary key when not adding model
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@11856 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-13 21:39:46 +00:00
Honza Král
3b895d4a9a [soc2009/model-validation] Merged to trunk at r11791
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@11798 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-07 01:41:26 +00:00
Honza Král
30ea350dab [soc2009/model-validation] Merged to trunk at r11724
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@11725 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-11-07 17:09:09 +00:00
Honza Král
dfe495fbe8 [soc2009/model-validation] Merged to trunk at r11603
SECURITY ALERT: Corrected regular expressions for URL and email fields.

git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@11617 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-10-12 10:16:17 +00:00
Honza Král
83a3588ff7 [soc2009/model-validation] Fixed #11826 django.forms.fields.URLField rejects valid URLs with no abs_path component
Thanks wam

git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@11525 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-09-11 22:12:30 +00:00
Honza Král
9222091de8 [soc2009/model-validation] Merged to trunk at r11499
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@11513 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-09-11 21:23:55 +00:00
Honza Král
78d75b86e3 [soc2009/model-validation] Merged to trunk at r11478
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@11504 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-09-11 21:06:15 +00:00
Honza Král
f20e7fcdd2 [soc2009/model-validation] simple test for URLValidator, RegexValidator and BaseValidator
URL tests copied from tests/regressiontests/forms/fields.py

git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@11460 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-08-15 13:35:43 +00:00
Honza Král
7a6a71dd0c [soc2009/model-validation] tests for validate_comma_separated_integer_list
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@11459 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-08-15 13:35:16 +00:00
Honza Král
15fb81c344 [soc2009/model-validation] test MinValueValidator, [Max|Min]LengthValidator
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@11458 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-08-15 13:34:59 +00:00
Honza Král
9578491379 [soc2009/model-validation] validators refactoring
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@11457 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-08-15 13:34:42 +00:00
Honza Král
05524abf1b [soc2009/model-validation] use validators in URLField model field
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@11456 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-08-15 13:34:21 +00:00
Honza Král
106089c18e [soc2009/model-validation] Make sure custom messages work for models as well
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@11437 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-08-12 20:10:54 +00:00
Honza Král
a604fc39d0 [soc2009/model-validation] Added custom messages to models
No tests yet and it broke queryset pickling

git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@11398 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-08-05 01:28:21 +00:00
Honza Král
82c76b98cb [soc2009/model-validation] Split validation tests
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@11397 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-08-05 01:27:56 +00:00
Honza Král
549b19af81 [soc2009/model-validation] Update model_forms test to actually test model form
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@11396 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-08-05 01:27:37 +00:00
Honza Král
97db2014f8 [soc2009/model-validation] Merged to trunk at r11365
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@11395 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-08-05 01:27:15 +00:00
Honza Král
8d4417c75d [soc2009/model-validation] Added capacity for ComplexValidator handling to models
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@11271 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-07-19 20:55:58 +00:00
Honza Král
d0c3e19de5 [soc2009/model-validation] Merget to trunk at r11229
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@11233 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-07-15 07:19:10 +00:00
Honza Král
f662801023 [soc2009/model-validation] Fixed test for CharField validation
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@11195 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-07-05 13:30:40 +00:00
Honza Král
ff0eff055e [soc2009/model-validation] Added min and max length validator. CharField now validates it's value's length using a validator.
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@11194 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-07-05 13:30:17 +00:00
Honza Král
0e3b83c315 [soc2009/model-validation] Added tests for MaxValueValidator
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@11193 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-07-05 13:29:40 +00:00
Honza Král
6610e857e3 [soc2009/model-validation] Minor simplification of validator tests
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@11192 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-07-05 13:29:24 +00:00
Honza Král
c1093ca87f [soc2009/model-validation] SlugField and IPAddressField now use validators.
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@11191 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-07-05 13:29:08 +00:00
Honza Král
cb7d3f2a0e [soc2009/model-validation] Validation test refactoring
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@11190 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-07-05 13:28:41 +00:00
Honza Král
7464e4ec27 [soc2009/model-validation] Name tests migrated from doctests
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@11189 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-07-05 13:28:23 +00:00
Honza Král
ce98a00987 [soc2009/model-validation] use assertEqual(a, b) instead of assertEqual(True, a == b) in unit tests
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@11188 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-07-05 13:28:07 +00:00
Honza Král
63f244f144 [soc2009/model-validation] Make sure that all validators in the same group (simple/complex) get run even if they all fail and we get all their messages.
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@11185 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-07-05 13:26:57 +00:00
Honza Král
69b4f2ea2e [soc2009/model-validation] renamed fields_unit to just fields
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@11183 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-07-05 13:26:11 +00:00
Honza Král
3bab02af8b [soc2009/model-validation] Removing the doctests replaced by fields_unit
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@11182 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-07-05 13:25:52 +00:00
Honza Král
d628498c58 [soc2009/model-validation] Merged to trunk at r11155
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@11158 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-07-02 16:07:15 +00:00
Honza Král
481fb86e13 [soc2009/model-validation] Minor test tweak
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@11157 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-07-02 16:05:33 +00:00
Honza Král
6fd54a9c0d [soc2009/model-validation] some test refactoring
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@11086 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-06-21 20:31:29 +00:00
Honza Král
6c0cc3724d [soc2009/model-validation] Added error message checking
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@11085 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-06-21 19:57:15 +00:00
Honza Král
6306f48545 [soc2009/model-validation] Migrated FormField tests to unittests
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@11084 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-06-21 19:24:49 +00:00
Honza Král
5ea9b72585 Merged to trunk at r11079
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@11083 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-06-21 19:24:30 +00:00
Honza Král
98e6ab0afc [soc2009/model-validation] merged to trunk at r11032
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@11038 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-06-18 01:37:18 +00:00
Honza Král
3a331970b4 [soc2009/model-validation] Added validators to DbFields
ComplexValidators are not yet run on the model and custom message
overring is still not in place

git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@11037 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-06-18 00:59:07 +00:00
Honza Král
9dee3b26e5 [soc2009/model-validation] Added tests for ComplexValidators
Also the tests for validators can now verify other exceptions and not
just ValidationError

git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@10949 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-06-08 00:56:01 +00:00