email validator does not check type?
Rafael Garcia <[email protected]> Sun, 23 Oct 2011 20:23:52 -0500
| Newsgroups | gmane.comp.python.formencode |
|---|---|
| Message-ID | <CABOPztnoqnSHO-QDiOwDyOE-QYhGA95dZSS4vscNtiwN+p09jw@mail.gmail.com> |
--===============6546064541914410550==
Content-Type: multipart/alternative; boundary=00151747b564c11efe04b001477a
--00151747b564c11efe04b001477a
Content-Type: text/plain; charset=ISO-8859-1
The docs say that EmailValidator can throw a badType error, but I think this
is incorrect:
> validators.Email().to_python(1)
File "/Library/Python/2.7/site-packages/formencode/api.py", line 419, in
to_python
value = tp(value, state)
File "/Library/Python/2.7/site-packages/formencode/validators.py", line
1335, in _to_python
return value.strip()
AttributeError: 'int' object has no attribute 'strip'
it appears _to_python() incorrectly assumes that the value is a string...
--00151747b564c11efe04b001477a
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
The docs say that EmailValidator can throw a badType error, but I think thi=
s is incorrect:<div><br></div><div><div>> validators.Email().to_python(1=
)</div></div><div><div>=A0File "/Library/Python/2.7/site-packages/form=
encode/api.py", line 419, in to_python</div>
<div>=A0 =A0 value =3D tp(value, state)</div><div>=A0 File "/Library/P=
ython/2.7/site-packages/formencode/validators.py", line 1335, in _to_p=
ython</div><div>=A0 =A0 return value.strip()</div><div>AttributeError: '=
;int' object has no attribute 'strip'</div>
</div><div><br></div><div>it appears _to_python() incorrectly assumes that =
the value is a string...</div>
--00151747b564c11efe04b001477a--
--===============6546064541914410550==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
------------------------------------------------------------------------------
The demand for IT networking professionals continues to grow, and the
demand for specialized networking skills is growing even more rapidly.
Take a complimentary Learning@Cisco Self-Assessment and learn
about Cisco certifications, training, and career opportunities.
http://p.sf.net/sfu/cisco-dev2dev
--===============6546064541914410550==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
FormEncode-discuss mailing list
FormEncode-discuss-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/formencode-discuss
--===============6546064541914410550==--