|
From: <sub...@co...> - 2005-12-08 17:54:32
|
Author: rflosi
Date: 2005-12-08 17:54:27 +0000 (Thu, 08 Dec 2005)
New Revision: 1378
Modified:
FormEncode/trunk/formencode/validators.py
Log:
convert fields to strings before calling strip in case them come in as integers
Modified: FormEncode/trunk/formencode/validators.py
===================================================================
--- FormEncode/trunk/formencode/validators.py 2005-12-08 17:50:20 UTC (rev 1377)
+++ FormEncode/trunk/formencode/validators.py 2005-12-08 17:54:27 UTC (rev 1378)
@@ -2210,8 +2210,8 @@
field_dict, state, error_dict=errors)
def _validateReturn(self, field_dict, state):
- ccExpiresMonth = field_dict[self.cc_expires_month_field].strip()
- ccExpiresYear = field_dict[self.cc_expires_year_field].strip()
+ ccExpiresMonth = str(field_dict[self.cc_expires_month_field]).strip()
+ ccExpiresYear = str(field_dict[self.cc_expires_year_field]).strip()
try:
ccExpiresMonth = int(ccExpiresMonth)
|