Changeset 7948 for django/branches/newforms-admin/django/core/validators.py
- Timestamp:
- 07/18/08 10:47:10 (6 months ago)
- Files:
-
- django/branches/newforms-admin (modified) (1 prop)
- django/branches/newforms-admin/django/core/validators.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/branches/newforms-admin
- Property svnmerge-integrated changed from /django/trunk:1-4345,4350-4357,4359-4365,4371-4372,4374-4377,4380-4386,4388,4390-4391,4400-4402,4404-4408,4410,4412-4419,4426-4427,4430-4432,4434,4441,4443-4444,4446-4447,4450,4452-4453,4455-4458,4476,4503,4546,4564-4569,4580-4586,4617,4630,4641-6390,6392-7943 to /django/trunk:1-4345,4350-4357,4359-4365,4371-4372,4374-4377,4380-4386,4388,4390-4391,4400-4402,4404-4408,4410,4412-4419,4426-4427,4430-4432,4434,4441,4443-4444,4446-4447,4450,4452-4453,4455-4458,4476,4503,4546,4564-4569,4580-4586,4617,4630,4641-6390,6392-7947
django/branches/newforms-admin/django/core/validators.py
r7853 r7948 142 142 # produces much friendlier error messages. 143 143 year, month, day = map(int, date_string.split('-')) 144 # This check is needed because strftime is used when saving the date145 # value to the database, and strftime requires that the year be >=1900.146 if year < 1900:147 raise ValidationError, _('Year must be 1900 or later.')148 144 try: 149 145 date(year, month, day) … … 408 404 Usage: If you create an instance of the IsPowerOf validator: 409 405 v = IsAPowerOf(2) 410 406 411 407 The following calls will succeed: 412 v(4, None) 408 v(4, None) 413 409 v(8, None) 414 410 v(16, None) 415 411 416 412 But this call: 417 413 v(17, None)
