Re: Allowing validation to pass for partial post values?

Iain Duncan <[email protected]> Fri, 27 Jul 2012 13:45:36 -0700
Newsgroups gmane.comp.python.formencode
Message-ID <CAN9NcLzecVXh04jcBMcZUOo7-fV+FAJT9kWhsma4TJ5WJkHCSw@mail.gmail.com>
--===============6085917437805439510==
Content-Type: multipart/alternative; boundary=e89a8ff1c89e4c521804c5d5cbdd

--e89a8ff1c89e4c521804c5d5cbdd
Content-Type: text/plain; charset=ISO-8859-1

>
>
> class PersonValidationSchema(ValidationSchema):
>     """validation schema for resource Person"""
>     # will totally ignore a missing value (unless if_missing provided)
>     ignore_key_missing = True
>     name_first = v.UnicodeString(not_empty=True)
>     name_last = v.UnicodeString(not_empty=True)
>     birthdate = IsoDate()
>
>
The above was exactly what I needed. Is there a reason this is not included
in the narrative docs? It would be really helpful to have it mentioned on
this page somewhere,

http://www.formencode.org/en/latest/Validator.html

 if it's in the docs, I had a hard time finding anything. Thanks so much!

Iain

--e89a8ff1c89e4c521804c5d5cbdd
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div class=3D"gmail_quote"><blockquote class=3D"gmail_quote" style=3D"margi=
n:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><br></d=
iv><div><div class=3D"im"><div style=3D"color:rgb(34,34,34);font-size:13px;=
font-family:arial,sans-serif">
class PersonValidationSchema(ValidationSchema):</div><div style=3D"color:rg=
b(34,34,34);font-size:13px;font-family:arial,sans-serif">
=A0 =A0 &quot;&quot;&quot;validation schema for resource Person&quot;&quot;=
&quot;</div></div><div style=3D"color:rgb(34,34,34);font-size:13px;font-fam=
ily:arial,sans-serif">=A0 =A0 # will totally ignore a missing value (unless=
 if_missing provided)</div>

<div style=3D"color:rgb(34,34,34);font-size:13px;font-family:arial,sans-ser=
if">=A0 =A0 ignore_key_missing =3D True=A0</div><div class=3D"im"><div styl=
e=3D"color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">
=A0 =A0 name_first =3D v.UnicodeString(not_empty=3DTrue)</div><div style=3D=
"color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">=A0 =A0 n=
ame_last =3D v.UnicodeString(not_empty=3DTrue)</div><div style=3D"color:rgb=
(34,34,34);font-size:13px;font-family:arial,sans-serif">

=A0 =A0 birthdate =3D IsoDate()</div><br></div></div></div></blockquote><di=
v><br></div><div>The above was exactly what I needed. Is there a reason thi=
s is not included in the narrative docs? It would be really helpful to have=
 it mentioned on this page somewhere,</div>
<div><br></div><div><a href=3D"http://www.formencode.org/en/latest/Validato=
r.html">http://www.formencode.org/en/latest/Validator.html</a></div><div><b=
r></div><div>=A0if it&#39;s in the docs, I had a hard time finding anything=
. Thanks so much!</div>
<div><br></div><div>Iain</div><div><br></div></div>

--e89a8ff1c89e4c521804c5d5cbdd--


--===============6085917437805439510==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
--===============6085917437805439510==
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

--===============6085917437805439510==--