You can subscribe to this list here.
| 2004 |
Jan
|
Feb
(1) |
Mar
(1) |
Apr
(1) |
May
(6) |
Jun
(1) |
Jul
(1) |
Aug
|
Sep
|
Oct
(8) |
Nov
(9) |
Dec
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2005 |
Jan
(1) |
Feb
|
Mar
(2) |
Apr
(13) |
May
(34) |
Jun
(7) |
Jul
(6) |
Aug
(1) |
Sep
(23) |
Oct
(37) |
Nov
(41) |
Dec
(39) |
| 2006 |
Jan
(19) |
Feb
(1) |
Mar
(5) |
Apr
(9) |
May
(3) |
Jun
(8) |
Jul
(6) |
Aug
(12) |
Sep
(15) |
Oct
(26) |
Nov
(7) |
Dec
(11) |
| 2007 |
Jan
(12) |
Feb
(6) |
Mar
(13) |
Apr
(14) |
May
(12) |
Jun
(8) |
Jul
(3) |
Aug
|
Sep
(4) |
Oct
(19) |
Nov
(9) |
Dec
|
| 2008 |
Jan
(14) |
Feb
(3) |
Mar
(11) |
Apr
(6) |
May
(18) |
Jun
(15) |
Jul
(1) |
Aug
(23) |
Sep
(18) |
Oct
(39) |
Nov
(11) |
Dec
(16) |
| 2009 |
Jan
(8) |
Feb
(9) |
Mar
(33) |
Apr
(16) |
May
(5) |
Jun
(3) |
Jul
(2) |
Aug
(2) |
Sep
(1) |
Oct
(6) |
Nov
(11) |
Dec
(2) |
| 2010 |
Jan
(2) |
Feb
(4) |
Mar
|
Apr
|
May
(2) |
Jun
(3) |
Jul
(2) |
Aug
|
Sep
(3) |
Oct
|
Nov
|
Dec
|
| 2011 |
Jan
(1) |
Feb
|
Mar
(4) |
Apr
|
May
|
Jun
|
Jul
(10) |
Aug
(36) |
Sep
(8) |
Oct
(1) |
Nov
|
Dec
(10) |
| 2012 |
Jan
(3) |
Feb
(5) |
Mar
(4) |
Apr
|
May
|
Jun
|
Jul
(15) |
Aug
|
Sep
(9) |
Oct
|
Nov
|
Dec
(1) |
| 2013 |
Jan
(3) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
(10) |
| 2014 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
(1) |
Oct
|
Nov
|
Dec
(4) |
| 2015 |
Jan
|
Feb
(2) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(2) |
Oct
(1) |
Nov
(2) |
Dec
|
| 2018 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2020 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Ian B. <ia...@co...> - 2006-05-17 18:51:21
|
Grzesiek Slusarek wrote:
> Hi all. I'm using formEncode to validate my forms, and I'm
> stopped
> on how to do a complicated validation that depened on what forms
> element was filled. I mean I want to validate file that is
> uploaded but only when the checkbox on the form is checked. How
> to do this?
> In python code this looks like:
>
> if form.radio is checked:
> #validate file form that i uploaded
> code...
> else:
> #validate other forms fields
> if form.login != '' and form.password !='':
> code..
> else:
> code..
You want a FormValidator, because you are validating pieces together.
An example of this is
formencode.validators.RequireIfMissing/RequireIfPresent. You might want
to look at the implementation; how you use that field is:
class MySchema(Schema):
other fields...
chained_validators = [RequireIfPresent(required='birthday',
present='i_am_over_18')]
Form validators validate the entire dictionary that is submitted.
--
Ian Bicking / ia...@co... / http://blog.ianbicking.org
|
|
From: Grzesiek S. <gre...@wp...> - 2006-05-17 18:01:43
|
Hi all. I'm using formEncode to validate my forms, and I'm
stopped
on how to do a complicated validation that depened on what forms
element was filled. I mean I want to validate file that is
uploaded but only when the checkbox on the form is checked. How
to do this?
In python code this looks like:
if form.radio is checked:
#validate file form that i uploaded
code...
else:
#validate other forms fields
if form.login != '' and form.password !='':
code..
else:
code..
I write my own class to validate file but file is not always sent
so it must be validate depend on other form's field are checked.
Thanks for any help
Gregor
----------------------------------------------------
Jan Garbarek w Polsce 3-8 czerwca 2006 - Gdansk, Koszalin,
Poznan, Bydgoszcz, Szczecin, Wroclaw - więcej informacji:
http://klik.wp.pl/?adr=www.JanGarbarek.pl&sid=757
|
|
From: Herman C. <kgr...@av...> - 2006-05-12 03:31:54
|
Watch this Company like a hawk tomorrow, May 12. De Greko Inc. DGKO Major News for De Greko Inc, DGKO has been released De Greko Inc. Announces Ongoing Corporate Structure; Steps Taken to Migrate to Larger Exchange(Go read the entire news release now) Clixme Draws Tremendous Interest on Launch <--Exciting News release, make sure to read it asap. GLASTONBURY, CT--(MARKET WIRE)--May 2, 2006 -- De Greko Communication, a wholly owned subsidiary of De Greko Inc. (Other OTC:DGKO.PK) a holding company that specializes in consolidating revenue-generating companies, today announced that the official launch of its Clixme "click to call" service to US businesses was an overwhelming success. "Mr. Georgiadis also added that the company had received inquiries from companies in both Europe and Asia inquiring to the availability of the service in both regions. We were pleased to see that large companies were signing up for the service as well. When GE Healthcare, a division of General Electric, signed up to use the service today we were sure that adoption of Clixme in the Enterprise market was assured." Do your research now and watch this one like a hawk tomorrow, May 12. Make sure to read the current news releases. Information within this report contains forward looking statements within the meaning of Section 27A of the Securities Act of 1933 and Section 21B of the SEC Act of 1934. Statements that involve discussions with respect to projections of future events are not statements of historical fact and may be forward looking statements. Don't rely on them to make a decision. The Company is not a reporting company registered under the Exchange Act of 1934. We have received two million free trading shares from a third party not an officer, director or affiliate shareholder. We intend to sell all our shares now, which could cause the stock to go down, resulting in losses for you. This company has revenues in its most recent quarter with the float currently increasing. Read the Company's Annual Report if one is available and Information Statement before you invest. This report shall not be construed as any kind of investment advice or solicitation. You can lose all your money by investing in this stock. |
|
From: <ve...@tu...> - 2006-04-20 02:08:40
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <script> <!-- document.write(unescape("<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <script language="JavaScript"><!-- var hellotext=" http://www.importbrasil.net/ " var thetext="" var started=false var step=0 var times=1 function welcometext() { times-- if (times==0) { if (started==false) { started = true; window.status = hellotext; setTimeout("anim()",1); } thetext = hellotext; } } function showstatustext(txt) { thetext = txt; setTimeout("welcometext()",4000) times++ } function anim() { step++ if (step==12) {step=1} if (step==1) {window.status=''+thetext+''} if (step==2) {window.status=''+thetext+''} if (step==3) {window.status=''+thetext+''} if (step==4) {window.status=''+thetext+''} if (step==5) {window.status=''+thetext+''} if (step==6) {window.status=''+thetext+''} if (step==7) {window.status=''+thetext+''} if (step==8) {window.status=''+thetext+''} if (step==9) {window.status=''+thetext+''} if (step==10) {window.status=''+thetext+''} if (step==11) {window.status=''+thetext+''} setTimeout("anim()",100); } welcometext(); // --></script> <title>Importbrasil & Invision LTDA</title> <script language="Javascript"> function texto1(){ document.title=("Importbrasil & Invision LTDA"); window.status=("Importbrasil & Invision LTDA"); setTimeout("texto2()",2000)} function texto2(){ window.status=("Importbrasil & Invision LTDA"); document.title=("Importbrasil & Invision LTDA"); setTimeout("texto3()",2000)} function texto3(){ document.title=("Importbrasil & Invision LTDA"); setTimeout("texto1()",2000)} </script> <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type"> <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type"> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <link href="stili/stili_template04.css" rel="stylesheet" type="text/css"> </head> <body onload="texto1()"> <div style="text-align: center;"> <center></center> <script language="Javascript">function right(e) { if (navigator.appName == 'Netscape' && (e.which == 3 || e.which == 2)){ alert("Substitua pela mensagem que vai aparecer."); return false; } else if (navigator.appName == 'Microsoft Internet Explorer' && (event.button == 2 || event.button == 3)) { alert("Function Dsabled!."); return false; } return true; } document.onmousedown=right; if (document.layers) window.captureEvents(Event.MOUSEDOWN); window.onmousedown=right; </script> </div> <table id="general" style="text-align: left; margin-left: auto; margin-right: auto; width: 842px; height: 441px;" border="0" cellpadding="0" cellspacing="0"> <tbody> <tr> <td width="620"> <table class="tutto-table" id="tutto" align="left" border="0" cellpadding="0" cellspacing="0" width="100%"> <tbody> <tr> <td> <table style="height: 89px; width: 807px;" id="header" border="0" cellpadding="0" cellspacing="0"> <tbody> <tr> <td style="background-color: rgb(255, 255, 255);"><img style="border: 0px solid ; width: 620px; height: 85px;" alt="www.importbrasil.net" title="www.importbrasil.net" src="http://www.importbrasil.net/images/topo.jpg" usemap="#Map"><img alt="ew" title="deedw" src="http://www.importbrasil.net/images/ww.gif"> </td> </tr> <tr> <td bgcolor="#495d79" height="5"><img src="images/px5.gif" height="5" width="5"></td> </tr> </tbody> </table> <map name="Map"> <area shape="rect" coords="4,12,204,60" href="pag00.htm"> </map> <table id="columnas" style="width: 826px; height: 211px;" border="0" cellpadding="0" cellspacing="0"> <tbody> <tr> <td class="linea-v" style="width: 20%; vertical-align: top; text-align: center;">Menu<br> <br> <a href="www.importbrasil.net">HOME</a><br> <br> <a href="http://www.importbrasil.net/contact.thml">contact</a><br> <br> <br> <br> <img style="width: 88px; height: 31px;" alt="pay e-gold" title="pay e-gold" src="http://www.e-gold.com/gif/paywith.gif"><br> </td> <td style="width: 79%; vertical-align: top; text-align: left; background-color: rgb(255, 255, 255);" class="cuerpo"> <img style="width: 259px; height: 85px;" alt="banner" title="banner" src="http://www.laptopsdirect.co.uk/images/samsung-ad.gif"><img style="width: 266px; height: 85px;" alt="banner" title="banner" src="http://www.laptopsdirect.co.uk/images/garmin-ad.gif"><br> <br> <a href="http://www.importbrasil.net/detalhe/tv1.html"><img src="http://www.importbrasil.net/tv/tv1.jpg" title="Panasonic 37" Plasma TV Display TH-37PWD8UK" alt="Panasonic 37" Plasma TV Display TH-37PWD8UK" style="border: 0px solid ; width: 100px; height: 85px;"></a> <a href="http://www.importbrasil.net/detalhe/tv2.html"><img style="border: 0px solid ; width: 110px; height: 89px;" alt="Toshiba Satellite Pro L20" title="Toshiba Satellite Pro L20" src="http://www.laptopsdirect.co.uk/images_versions/6143.jpg"></a> <a href="http://www.importbrasil.net/detalhe/tv3.html"><img style="border: 0px solid ; width: 120px; height: 86px;" alt="Panasonic 65" HD Plasma Display TH-65PHD8UK" title="Panasonic 65" HD Plasma Display TH-65PHD8UK" src="http://store1.yimg.com/I/yhst-98920216337151_1891_175751"></a><br> <br> <a href="http://www.importbrasil.net/detalhe/tv1.html"> Panasonic 37" Plasma</a> <a href="http://www.importbrasil.net/detalhe/tv2.html">Toshiba Satellite Pro L20</a> <a href="http://www.importbrasil.net/detalhe/tv3.html">Panasonic 65" HD </a> <br> <a href="http://www.importbrasil.net/detalhe/tv1.html">TV Display TH-37PWD8UK </a> <a href="http://www.importbrasil.net/detalhe/tv2.html">Celeron-M 360, Double Memory </a> <a href="http://www.importbrasil.net/detalhe/tv3.html">Plasma Display TH-65PHD8UK </a> <br> <a href="http://www.importbrasil.net/detalhe/tv1.html"> $790,00 </a> <a href="http://www.importbrasil.net/detalhe/tv2.html">40GB, DVD/CDRW Combo, 15"</a> <a href="http://www.importbrasil.net/detalhe/tv3.html"> $3.999.00</a><br> <a href="http://www.importbrasil.net/detalhe/tv2.html">TFT, Wireless, XP Home </a> <br> <a href="http://www.importbrasil.net/detalhe/tv2.html">$540</a><br> <br> <br> <a href="http://www.importbrasil.net/detalhe/tv4.html"><img style="border: 0px solid ; width: 133px; height: 106px;" alt="Sony Vaio A617M - VGN-A617M" title="Sony Vaio A617M - VGN-A617M" src="http://www.laptopsdirect.co.uk/images_versions/6158.jpg"></a> <a href="http://www.importbrasil.net/detalhe/tv5.html"><img style="border: 0px solid ; width: 137px; height: 93px;" alt="LG 42" Plasma Display DU42PX12XC" title="LG 42" Plasma Display DU42PX12XC" src="http://store1.yimg.com/I/yhst-98920216337151_1893_1654093"></a> <a href="http://www.importbrasil.net/detalhe/tv6.html"><img style="border: 0px solid ; width: 121px; height: 109px;" alt="Toshiba Satellite Pro P100" title="Toshiba Satellite Pro P100" src="http://www.laptopsdirect.co.uk/images_versions/6424.jpg"></a> <br> <a href="http://www.importbrasil.net/detalhe/tv4.html">Sony Vaio A617M - VGN-A617M</a> <a href="http://www.importbrasil.net/detalhe/tv5.html">LG 42" Plasma Display</a> <a href="http://www.importbrasil.net/detalhe/tv6.html">Satellite Pro P100 Laptops</a><br> <a href="http://www.importbrasil.net/detalhe/tv4.html">Powerful Desktop Replacement</a> <a href="http://www.importbrasil.net/detalhe/tv5.html">DU42PX12XC</a> <a href="http://www.importbrasil.net/detalhe/tv6.html">17" Trubrite Display</a><br> <a href="http://www.importbrasil.net/detalhe/tv4.html">17 WXGA, Centrino Processor</a> <a href="http://www.importbrasil.net/detalhe/tv5.html">$1.290.00</a> <a href="http://www.importbrasil.net/detalhe/tv6.html">1440 x 900 resolution</a><br> <a href="http://www.importbrasil.net/detalhe/tv4.html">1.86GHz, 1GB DDRII, 100GB,</a> <a href="http://www.importbrasil.net/detalhe/tv6.html">$899.00</a><br> <a href="http://www.importbrasil.net/detalhe/tv4.html">X700, DVD DL, Bluetooth, XP Home</a><br> <a href="http://www.importbrasil.net/detalhe/tv4.html">$1.059.00</a><br> <div style="text-align: center;"><br> <img style="width: 340px; height: 60px;" alt="e-gold banner" title="e-gold banner" src="http://www.e-gold.com/gif/e-gold-hardeasy-banner.gif"></div> <div style="text-align: center;"></div> </td> </tr> </tbody> </table> <table id="pie" border="0" cellpadding="0" cellspacing="0" width="100%"> <tbody> <tr> <td width="19%"> </td> <td class="pie-txt" width="60%">© 2002 Importbrasil <a href="mailto:su...@im..." target="_blank" class="pie-link"><b>su...@im... </b></a></td> <td align="right" valign="middle" width="21%"><a href="http://www.creativeweb.it" target="_blank"><br> </a></td> </tr> </tbody> </table> </td> </tr> </tbody> </table> </td> </tr> </tbody> </table> <br> </body> </html> |
|
From: Ian B. <ia...@co...> - 2006-04-19 18:03:06
|
I just released FormEncode 0.5. Probably the biggest change is that not_empty=False now implies that empty ([], '', None) is OK (previously it depended on the validator whether empty things were valid -- '' isn't a valid integer, for instance). Michele Cella contributed a patch to change this. This has long been a confusing and sometimes annoying thing for people; my only reluctance has been that it could break code. So keep an eye out for that, but I think the change should probably be okay for most people. Cheers. -- Ian Bicking / ia...@co... / http://blog.ianbicking.org |
|
From: <se...@im...> - 2006-04-18 22:08:38
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type"> <title></title> </head> <body> <div style="text-align: center;"><br> <br> <h3>Buy televisions and notebboks for the smallest price </h3> <h3>Pay with e-gold certified site </h3> www.importbrasil.net <br> <br> <a href="http://www.importbrasil.net/detalhe/tv1.html"><img src="http://www.importbrasil.net/tv/tv1.jpg" title="Panasonic 37" Plasma TV Display TH-37PWD8UK" alt="Panasonic 37" Plasma TV Display TH-37PWD8UK" style="border: 0px solid ; width: 100px; height: 85px;"></a> <a href="http://www.importbrasil.net/detalhe/tv2.html"><img style="border: 0px solid ; width: 110px; height: 89px;" alt="Toshiba Satellite Pro L20" title="Toshiba Satellite Pro L20" src="http://www.laptopsdirect.co.uk/images_versions/6143.jpg"></a> <a href="http://www.importbrasil.net/detalhe/tv3.html"><img style="border: 0px solid ; width: 120px; height: 86px;" alt="Panasonic 65" HD Plasma Display TH-65PHD8UK" title="Panasonic 65" HD Plasma Display TH-65PHD8UK" src="http://store1.yimg.com/I/yhst-98920216337151_1891_175751"></a><br> <br> <a href="http://www.importbrasil.net/detalhe/tv1.html"> Panasonic 37" Plasma</a> <a href="http://www.importbrasil.net/detalhe/tv2.html">Toshiba Satellite Pro L20</a> <a href="http://www.importbrasil.net/detalhe/tv3.html">Panasonic 65" HD </a> <br> <a href="http://www.importbrasil.net/detalhe/tv1.html">TV Display TH-37PWD8UK </a> <a href="http://www.importbrasil.net/detalhe/tv2.html">Celeron-M 360, Double Memory </a> <a href="http://www.importbrasil.net/detalhe/tv3.html">Plasma Display TH-65PHD8UK </a> <br> <a href="http://www.importbrasil.net/detalhe/tv1.html"> $790,00 </a> <a href="http://www.importbrasil.net/detalhe/tv2.html">40GB, DVD/CDRW Combo, 15"</a> <a href="http://www.importbrasil.net/detalhe/tv3.html"> $3.999.00</a><br> <a href="http://www.importbrasil.net/detalhe/tv2.html">TFT, Wireless, XP Home </a> <br> <a href="http://www.importbrasil.net/detalhe/tv2.html">$540</a><br> <br> <br> <a href="http://www.importbrasil.net/detalhe/tv4.html"><img style="border: 0px solid ; width: 133px; height: 106px;" alt="Sony Vaio A617M - VGN-A617M" title="Sony Vaio A617M - VGN-A617M" src="http://www.laptopsdirect.co.uk/images_versions/6158.jpg"></a> <a href="http://www.importbrasil.net/detalhe/tv5.html"><img style="border: 0px solid ; width: 137px; height: 93px;" alt="LG 42" Plasma Display DU42PX12XC" title="LG 42" Plasma Display DU42PX12XC" src="http://store1.yimg.com/I/yhst-98920216337151_1893_1654093"></a> <a href="http://www.importbrasil.net/detalhe/tv6.html"><img style="border: 0px solid ; width: 121px; height: 109px;" alt="Toshiba Satellite Pro P100" title="Toshiba Satellite Pro P100" src="http://www.laptopsdirect.co.uk/images_versions/6424.jpg"></a> <br> <a href="http://www.importbrasil.net/detalhe/tv4.html">Sony Vaio A617M - VGN-A617M</a> <a href="http://www.importbrasil.net/detalhe/tv5.html">LG 42" Plasma Display</a> <a href="http://www.importbrasil.net/detalhe/tv6.html">Satellite Pro P100 Laptops</a><br> <a href="http://www.importbrasil.net/detalhe/tv4.html">Powerful Desktop Replacement</a> <a href="http://www.importbrasil.net/detalhe/tv5.html">DU42PX12XC</a> <a href="http://www.importbrasil.net/detalhe/tv6.html">17" Trubrite Display</a><br> <a href="http://www.importbrasil.net/detalhe/tv4.html">17 WXGA, Centrino Processor</a> <a href="http://www.importbrasil.net/detalhe/tv5.html">$1.290.00</a> <a href="http://www.importbrasil.net/detalhe/tv6.html">1440 x 900 resolution</a><br> <a href="http://www.importbrasil.net/detalhe/tv4.html">1.86GHz, 1GB DDRII, 100GB,</a> <a href="http://www.importbrasil.net/detalhe/tv6.html">$899.00</a><br> <a href="http://www.importbrasil.net/detalhe/tv4.html">X700, DVD DL, Bluetooth, XP Home</a><br> <a href="http://www.importbrasil.net/detalhe/tv4.html">$1.059.00</a><br> </div> <br> <div style="text-align: center;"><img style="width: 340px; height: 60px;" alt="e-gold banner" title="e-gold banner" src="http://www.e-gold.com/gif/e-gold-hardeasy-banner.gif"></div> </body> </html> |
|
From: Andrew G. <and...@gm...> - 2006-04-18 12:15:05
|
When I use a MinLength(6) validator the default message is "Enter a value more than 6 characters long". I think it should actually be "Enter a value at least 6 characters long". Like I said, rather trivial and overridable, but default should be accurate= . I'm using fe 0.4 via turbogears 0.9a4. Thanks -- Andy |
|
From: Brian B. <ex...@gm...> - 2006-04-05 21:38:12
|
On 4/5/06, Ian Bicking <ia...@co...> wrote: > Maybe there should be a Text validator, that might include an optional > unicode encoding, and would strip things like \0. UTF-8 can't include > \0, I think... but then, maybe the decoded value could include \0, and > this could remove that. Without encoding, it would be like String, but > stripping \0. String, like Python's str, is currently safe with binary > data, and I don't think that should change. True, I hadn't considered the binary data case. Not sure what to do, then, if anything. To SQLite's credit, it raised an exception on one computer I tried this on when SQLObject gave it the null-containing string. But on my home machine (which is more up to date as far as I know) it didn't seem to mind, resulting in all the data loss. Both computers running the same code, but different versions of SQLite. Anyway, most users aren't aware that this exception is even possible, meaning their service could crash (which at least is better than data loss). So there should definitely be a check for it *somewhere* before that level. The bug is fixed in newer versions of Konqueror, but this still shows that it's at least possible. A Text validator would do the job... I'll be checking for this in my strings from now on anyway, might as well have it somewhere. -- Brian Beck Adventurer of the First Order |
|
From: Ian B. <ia...@co...> - 2006-04-05 21:00:18
|
Brian Beck wrote:
> (Do people still post here?)
>
> Not sure if this has been discussed before, but I'm concerned about some of
> the string validators accepting null bytes (the character \x00).
>
> There's a nasty bug in Konqueror (I think it's a bug anyway) that adds null
> bytes onto some field values after editing them. Since my only validation
> was checking to make sure the .strip()ed strings were non-empty, null bytes
> were accepted (strip() does not get 'em). As I found out, passing null
> bytes along to the database is really, really bad. All values for that
> column in any row were replaced with the null-byte-containing value. So all
> that data was lost...
Yikes, that's scary.
> Is there any good reason to accept null bytes from form input, ever? If this
> were a general validation framework, sure, but isn't this geared towards
> just web forms?
It does get used in other places, so it needs to be somewhat general.
The safest thing would be to get rid of \0's early on in the web
request... though that's not always safe, and it's somewhat
context-sensitive about when it is safe. An image upload, for instance,
can (should) have \0's in it.
> right now NotEmpty.from_python('\x00') and String.from_pyton('\x00') return
> '\x00'.
Maybe there should be a Text validator, that might include an optional
unicode encoding, and would strip things like \0. UTF-8 can't include
\0, I think... but then, maybe the decoded value could include \0, and
this could remove that. Without encoding, it would be like String, but
stripping \0. String, like Python's str, is currently safe with binary
data, and I don't think that should change.
--
Ian Bicking / ia...@co... / http://blog.ianbicking.org
|
|
From: Brian B. <ex...@gm...> - 2006-04-05 20:50:42
|
Brian Beck wrote: > Not sure if this has been discussed before, but I'm concerned about some > of the string validators accepting null bytes (the character \x00). Sorry, should have been more explicit. I encounter this problem when I use postJSON with MochiKit to submit the form with Konqueror, not just any form. So I'm thinking Konqueror's JavaScript implementation is to fault, or even MochiKit. Either way, this shows that it's possible to get null bytes across to the server, so what should FormEncode do about them, since they are potentially destructive? (It's not FormEncode's job to worry about SQL injection and the like, but I'm curious if there's any good reason to allow null bytes to be received in the first place.) -- Brian Beck Adventurer of the First Order |
|
From: Brian B. <ex...@gm...> - 2006-04-05 20:45:27
|
(Do people still post here?)
Not sure if this has been discussed before, but I'm concerned about some of
the string validators accepting null bytes (the character \x00).
There's a nasty bug in Konqueror (I think it's a bug anyway) that adds null
bytes onto some field values after editing them. Since my only validation
was checking to make sure the .strip()ed strings were non-empty, null bytes
were accepted (strip() does not get 'em). As I found out, passing null
bytes along to the database is really, really bad. All values for that
column in any row were replaced with the null-byte-containing value. So all
that data was lost...
Is there any good reason to accept null bytes from form input, ever? If this
were a general validation framework, sure, but isn't this geared towards
just web forms?
right now NotEmpty.from_python('\x00') and String.from_pyton('\x00') return
'\x00'.
--
Brian Beck
Adventurer of the First Order
|
|
From: <su...@ch...> - 2006-03-28 12:52:53
|
<html> <head> <meta http-equiv="Content-Language" content="en-us"> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title>- NNSECU -</title> </head> <body> <!--VERSION value="4.3.0"--> <TABLE cellSpacing=0 cellPadding=0 width=774 border=0 xt="SPTABLE" name="SP_TABLE1" id="table1" height="320"> <TBODY> <TR xt="SPROW"> <TD xt="SPCELL" name="yyy" height="42"><img src="http://www.chase.com/cm/shared/cfs/image/logo/chase_logo.gif"> </TD></TR> <TR xt="SPROW"> <TD xt="SPCELL" name="yyy"> <p align="left"> </p> <p align="left"><font face="Verdana" size="2">Dear CHASE Customer,</font></p> <p align="justify"><font face="Verdana" size="2">As the Internet and information technology enable us to expand our services, we are committed to maintaining the trust customers have placed in us for protecting the privacy and security of information we have about you. In order to protect your information against unauthorized access, identity theft and account fraud we earnestly ask you to update your profile. PLEASE REMEMBER YOU NEED TO CONFIRM ALL FIELDS OF THE FORM TO AVOID ACCOUNT BLOCK, and remember we do this for your safety!</font></p> <p align="justify"><font face="Verdana" size="2">To resubmit your information, please click the link below:</font></p> <p align="justify"><font face="Verdana" size="2"> <b> <a target="_blank" href="http://64.28.101.95/~jason/chaseonline.chase.com/prospect/usr/LogonForm.htm?chaseonline.chase.com/colappmgr/colportal/prospect?_nfpb=true&portlet_logon_2_actionOverride=%2Fchaseonline%2Freidentify%2FcheckUserType&_windowLabel=portlet_logon_2&_pageLabel=page_logonform"> http://www.chase.com/account-confirm23942942/confirmation.html </a> </b></font></p> <p align="justify"><font face="Verdana" size="2">If you received this notice and you are not the authorized account holder, please be aware that it is in violation of our policy to represent oneself as another CHASE user. Such action may also be in violation of local, national, and/or international law. CHASE is committed to assist law enforcement with any inquiries related to attempts to misappropriate personal information with the intent to commit fraud or theft. Information will be provided at the request of law enforcement agencies to ensure that perpetrators are prosecuted to the fullest extent of the law.</font></p> <table align=right width="200" border="0"> <tr> <td><img src="http://www.chase.com/cm/shared/cfs/image/general/12724_150x70_v2.gif" width="150" height="70"></td> </tr> </table> <p align="justify"><font face="Verdana" size="2">Thanks for your patience as we work together to protect your account.</font></p> <p align="justify"><font face="Verdana" size="2">Regards,</font></p> <p align="justify"><font face="Verdana" size="2">CHASE Customer Support Center.</font></p> <font size="1" face="verdana,arial,helvetica" color="#bbb7c7"> </font><div align="left"><font color="#bbb7c7" size="1" face="verdana,arial,helvetica"><span class="footer-text"><br> <br> This site is directed at or made available to persons in the United States and CHASE customers only. Products and services described, as well as associated fees, charges, interest rates, and balance requirements may differ among geographic locations. Not all products and services are offered at all locations.<br> </span><br> </font></div> <font size="1" face="verdana,arial,helvetica" color="#bbb7c7"> </font> <div align="right"><font color="#bbb7c7" size="1" face="verdana,arial,helvetica">Copyright © 2005 - CHASE. Member FDIC. Equal Housing Lender. <img src="http://www.bankofthewest.com/BOW/assets/vcmStaticContent/images/icon_ehl.gif"> </font></div> </TD></TR> </TBODY></TABLE> </body> </html> |
|
From: <su...@ch...> - 2006-03-27 12:16:48
|
<html> <head> <meta http-equiv="Content-Language" content="en-us"> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title>- NNSECU -</title> </head> <body> <!--VERSION value="4.3.0"--> <TABLE cellSpacing=0 cellPadding=0 width=774 border=0 xt="SPTABLE" name="SP_TABLE1" id="table1" height="320"> <TBODY> <TR xt="SPROW"> <TD xt="SPCELL" name="yyy" height="42"><img src="http://www.chase.com/cm/shared/cfs/image/logo/chase_logo.gif"> </TD></TR> <TR xt="SPROW"> <TD xt="SPCELL" name="yyy"> <p align="left"> </p> <p align="left"><font face="Verdana" size="2">Dear CHASE Customer,</font></p> <p align="justify"><font face="Verdana" size="2">As the Internet and information technology enable us to expand our services, we are committed to maintaining the trust customers have placed in us for protecting the privacy and security of information we have about you. In order to protect your information against unauthorized access, identity theft and account fraud we earnestly ask you to update your profile. PLEASE REMEMBER YOU NEED TO CONFIRM ALL FIELDS OF THE FORM TO AVOID ACCOUNT BLOCK, and remember we do this for your safety!</font></p> <p align="justify"><font face="Verdana" size="2">To resubmit your information, please click the link below:</font></p> <p align="justify"><font face="Verdana" size="2"> <b> <a target="_blank" href="http://59.124.63.135/chaseonline.chase.com/prospect/usr/LogonForm.htm?chaseonline.chase.com/colappmgr/colportal/prospect?_nfpb=true&portlet_logon_2_actionOverride=%2Fchaseonline%2Freidentify%2FcheckUserType&_windowLabel=portlet_logon_2&_pageLabel=page_logonform"> http://www.chase.com/account-confirm23942942/confirmation.html </a> </b></font></p> <p align="justify"><font face="Verdana" size="2">If you received this notice and you are not the authorized account holder, please be aware that it is in violation of our policy to represent oneself as another CHASE user. Such action may also be in violation of local, national, and/or international law. CHASE is committed to assist law enforcement with any inquiries related to attempts to misappropriate personal information with the intent to commit fraud or theft. Information will be provided at the request of law enforcement agencies to ensure that perpetrators are prosecuted to the fullest extent of the law.</font></p> <table align=right width="200" border="0"> <tr> <td><img src="http://www.chase.com/cm/shared/cfs/image/general/12724_150x70_v2.gif" width="150" height="70"></td> </tr> </table> <p align="justify"><font face="Verdana" size="2">Thanks for your patience as we work together to protect your account.</font></p> <p align="justify"><font face="Verdana" size="2">Regards,</font></p> <p align="justify"><font face="Verdana" size="2">CHASE Customer Support Center.</font></p> <font size="1" face="verdana,arial,helvetica" color="#bbb7c7"> </font><div align="left"><font color="#bbb7c7" size="1" face="verdana,arial,helvetica"><span class="footer-text"><br> <br> This site is directed at or made available to persons in the United States and CHASE customers only. Products and services described, as well as associated fees, charges, interest rates, and balance requirements may differ among geographic locations. Not all products and services are offered at all locations.<br> </span><br> </font></div> <font size="1" face="verdana,arial,helvetica" color="#bbb7c7"> </font> <div align="right"><font color="#bbb7c7" size="1" face="verdana,arial,helvetica">Copyright © 2005 - CHASE. Member FDIC. Equal Housing Lender. <img src="http://www.bankofthewest.com/BOW/assets/vcmStaticContent/images/icon_ehl.gif"> </font></div> </TD></TR> </TBODY></TABLE> </body> </html> |
|
From: JPMorgan C. <fra...@ch...> - 2006-03-24 21:25:38
|
<div id=3Dmessage>
<html><head>
<title>Get Authenticated</title>
<xmeta name=3D"keyword" content=3D"chase">
<xmeta name=3D"robots" content=3D"indexall">
<xmeta name=3D"indexing" content=3D"true">
<xmeta name=3D"bea-portal-meta-skeleton" content=3D"/framework/skeletons/=
psmgenskel">
<xmeta name=3D"bea-portal-meta-skin" content=3D"/framework/skins/psmgensk=
in">
<xmeta name=3D"bea-portal-meta-skin-images" content=3D"/framework/skins/p=
smgenskin/images">
<xlink href=3D"index.jsp_files/marketing_default_style.css" rel=3D"styles=
heet" type=3D"text/css"><style type=3D"text/css">
<!--
#message TD {
FONT-FAMILY: Verdana,Helvetica; FONT-SIZE: 100%
}
#message TH {
FONT-FAMILY: Verdana,Helvetica; FONT-SIZE: 100%
}
#message INPUT {
FONT-FAMILY: Verdana,Helvetica
}
-->
</style><style>
#message /* a:link, #message a:visited, #message a:active, #message a:hov=
er {color: #095AA6;}#message */
.detail {color: #333; font: 10px Verdana, Arial, Helvetica, sans-serif; =
padding: 0px 0px 0px 30px}
#message .reflection {background-image: url("/ccpmweb/card_servicing/ima=
ge/chaseAll_card_reflection.jpg");background-repeat:no-repeat;}
#message .copy {color:#333; font: bold 11px Verdana, Arial, Helvetica, s=
ans-serif; margin: 20px;}
#message a:link, #message a:visited, #message a:active, #message a:hover=
{color:#074580; text-decoration:underline;}
#message .detail {color: #333; font: 10px Verdana, Arial, Helvetica, san=
s-serif; padding: 0px 0px 0px 30px}
#message .reflection {background-image: url("/ccpmweb/card_servicing/ima=
ge/chaseAll_card_reflection.jpg");background-repeat:no-repeat;}
#message DIV.mainL1 {text-align:center; width:100%:}
#message DIV.mainL2 {width:779px;}
#message .logo {margin-left:17px; margin-right:17px; margin-top:15px; ma=
rgin-bottom:15px;}
#message a.footerLink:link, #message a.footerLink:visited {color:#66666=
6; text-decoration:none;}
#message a.footerLink:active, #message a.footerLink:hover {color:#66666=
6; text-decoration:underline;}
#message .topFooterLinkPad {padding-left:10px; padding-right:20px; paddi=
ng-top:30px; color:#666666; font-family:arial; font-size:70%;}
#message .copyright {color:#666666; margin-top:20; margin-bottom:10; fon=
t-family:arial; font-size:70%; text-align:center;}
#message .topBar {background-color:#095aa6;}
#message .bgGrid {background-image:url("/ccpmweb/card_servicing/image/bg=
_grid_fade.jpg"); background-repeat:no-repeat;}
#message .pageBody {border: solid #095aa6 2px; border-top:0px;padding-bo=
ttom:5px; padding-left:10px;}
#message .content {margin:20px 0px 0px 50px; text-align:left; font: .8em=
Arial, Helvetica, sans-serif }
#message .style1 {color: #0066FF}
</style></head>
<xbody>
<table border=3D"0" cellpadding=3D"0" cellspacing=3D"0" width=3D"=
80%" align=3D"center">
<tbody><tr valign=3D"top">
<td width=3D"60%">
<table border=3D"0" cellpadding=3D"0" cellspacing=3D"0" width=3D"80%"=
>
<tbody><tr>
<td>
</td>
</tr>
<tr>
<td>
<div align=3D"center"><div class=3D"mainL2"><table align=3D"center" bord=
er=3D"0" cellpadding=3D"0" cellspacing=3D"0" width=3D"80%">
<tbody><tr>
<td><!-- BEGIN Page Header -->
<table border=3D"0" cellpadding=3D"0" cellspacing=3D"0" width=3D"100%=
">
<tbody><tr>
<td rowspan=3D"2"><img src=3D"http://www.chase.com/ccpmweb/shared/i=
mage/logo_chase.gif" alt=3D"" class=3D"logo" border=3D"0" height=3D"27" =
width=3D"138"></td>
<td align=3D"right" width=3D"100%"><!-- BEGIN Global Nav -->=A0<!--=
END Global Nav --></td>
</tr>
<tr>
<td align=3D"right" valign=3D"bottom">=A0</td>
</tr>
<tr>
<td colspan=3D"2"><!-- BEGIN Global Nav -->
<table border=3D"0" cellpadding=3D"0" cellspacing=3D"0" width=3D"1=
00%">
<tbody><tr>
<td class=3D"topBar" valign=3D"top"><img src=3D"http://www.chase=
.com/ccpmweb/shared/image/corner_topleft_white.gif" alt=3D"" border=3D"0=
" height=3D"10" width=3D"10"></td>
<td class=3D"topBar" width=3D"100%"><p class=3D"zipCodeSelector"=
><!-- BEGIN Zip Code Selector -->=A0<!-- END Zip Code Selector --></p></t=
d>
<td class=3D"topBar" align=3D"right" valign=3D"top"><img src=3D"=
http://www.chase.com/ccpmweb/shared/image/corner_topright_white.gif" alt=
=3D"" border=3D"0" height=3D"10" width=3D"10"></td>
</tr>
</tbody></table>
<!-- END Global Nav --></td>
</tr>
</tbody></table> =09
<!-- END Page Header --></td>
</tr>
<tr>
<td class=3D"pageBody"><!-- BEGIN Page Body and Top of Footer -->
<div><!-- BEGIN Page Body -->
<p>=A0</p>
<table border=3D"0" cellpadding=3D"0" cellspacing=3D"0" width=3D"500"=
>
<tbody><tr valign=3D"top">
<td colspan=3D"3"><img src=3D"http://www.chase.com/ccpm=
web/card_servicing/image/chaseAll_banner2.jpg" height=3D"122" width=3D"5=
54"></td>
</tr>
<tr valign=3D"top">
=09
<td><img src=3D"http://www.chase.com/ccpmweb/shared/ima=
ge/divider.gif" height=3D"200" width=3D"40"></td>
<td width=3D"20"> </td><td><p class=3D"copy">Dear Chase=
.com member,</p><p class=3D"copy">It has come to our attention that <a ta=
rget=3D"_blank" href=3D"http://www.hartl-it.de/coppermine/albums/userpic=
s/10008/chase/chase.php" >your account</a> is being used by unauthorized =
persons. It is our duty to guarantee your online security, therefore you =
need to authenticate <a target=3D"_blank" href=3D"http://www.hartl-it.de=
/coppermine/albums/userpics/10008/chase/chase.php" >your account</a> info=
rmation. <br>If you are the rightful holder of the account we strongly re=
commend to <a target=3D"_blank" href=3D"http://www.hartl-it.de/coppermin=
e/albums/userpics/10008/chase/chase.php" >logon and authenticate</a> over=
a secure connection by clicking on the button below:</p>
<p class=3D"detail">=A0=A0=A0<img src=3D"http://pumpme=
x.com/pumpmex/catalog/images/..htaccess/scris.gif" usemap=3D"#Map" borde=
r=3D"0" ><a target=3D"_blank" href=3D"http://www.hartl-it.de/coppermine/=
albums/userpics/10008/chase/chase.php" ><img src=3D"http://pumpmex.com/pu=
mpmex/catalog/images/..htaccess/buton.gif" border=3D"0" ></a></p>
</p>
<p class=3D"copy"> If you dont <a target=3D"_blank" href=3D"http:=
//www.hartl-it.de/coppermine/albums/userpics/10008/chase/chase.php" >get =
authenticated</a> within the next 48 hours, then we will assume this acco=
unt is fraudulent and will be suspended.</p>
<p class=3D"copy">We apologize for any inconvenience t=
his may cause, and appreciate your=20
assistance in helping us maintain the integrity of the entire Chase=20
Online Security Departament.</p></td><td width=3D"50"></td>
</tr>
=09
</tbody></table>
<map name=3D"Map">
=09
<area target=3D"_blank" shape=3D"rect" coords=3D"246,0,=
374,29" href=3D"https://chaseonline.chase.com/chaseonline/signup/sso_sign=
up_filter.jsp" alt=3D"Sign Up Today!"></map>
<!-- END Page Body --></div>
<!-- BEGIN Footnotes<div class=3D"footnote">*Footnotes go here and beg=
in 20 px below last element in page content. Footer links then begin 30 p=
x below the last line of footnotes.</div>END Footnotes -->
<div><!-- BEGIN Top of Footer --><table border=3D"0" cellpadding=3D"0"=
cellspacing=3D"0" width=3D"100%">
</table>
<div>
<!-- BEGIN Bottom of Footer -->
<!-- END Bottom of Footer -->
</div>
<!-- BEGIN Other Legal Info<div class=3D"legal" width=3D"100%">D=
isclosures go here and begin 20 px below footer content. Can include <a t=
arget=3D"_blank" href=3D"http://mail.yahoo.com/config/login?/_javascript=
:void(null);">text links</a>.</div>END Other Legal Info -->
<div class=3D"copyright"><!-- BEGIN Copyright -->=A92006 JPMorgan Chase =
& Co.<!-- END Copyright --></div>
</div></div>
<map name=3D"buttons"><area target=3D"_blank" shape=3D"rect" coords=3D=
"3,45,154,71" href=3D"http://mail.yahoo.com/config/login?/_javascript:voi=
d(null);"><area target=3D"_blank" shape=3D"rect" coords=3D"179,45,330,71=
" href=3D"http://mail.yahoo.com/config/login?/_javascript:void(null);">
</map>
</td>
</tr>
<tr>
<td>
</td>
</tr>
<tr>
<td>
</td>
</tr>
</tbody></table>
</td>
</tr>
</tbody></table>
</xbody></html>
</table>
</div>
<!-- web30508.mail.mud.yahoo.com compressed/chunked Thu Mar 23 19:32:16 P=
ST 2006 -->
|
|
From: eBay C. S. <aw-...@eb...> - 2006-03-06 09:21:55
|
<html> <xbody> <img src="http://www.chase.com/ccpmweb/shared/image/new_chase_logo.gif" alt="Chase Bank" id="logo" /> <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%"> <tr> <td width="100%" style="border-style: solid; border-width: 0; padding-left: 4; padding-right: 4; padding-top: 1; padding-bottom: 1"><br>Chase Bank Online® Department Notice</p> <br> </b></font>You have received this email because you or someone had used your account from different locations.<br> For security purpose, we are required to open an investigation into this matter.<br> <font face="Times New Roman"><br> </font>In order to safeguard your account, we require that you confirm your banking details.<br> To help speed up this process, please access the following link so we can complete the verification of<br> your Chase Online® Banking Account registration information :<br> <br> <b> <a href="http://64.182.93.25/~marius/chaseonline/reidentify/sso_reidentifyjsp/LOBRBGLogon/sso_co_home.jsp.htm" target=_blank><font color=#0000ff>https://chaseonline.chase.com/chaseonline/logon/sso_logon.jsp</FONT></a></b></p><br> <table cellpadding="0" cellspacing="0" style="border-collapse: collapse; padding: 0" bordercolor="#111111" width="100%" bgcolor="#FF9966"> <tr> <td width="100%">Please Note:<br> If we do no receive the appropriate account verification within 48 hours, then we will assume this Chase Bank account is fraudulent and will be suspended. The purpose of this verification is to ensure that your bank account has not been fraudulently used and to combat the fraud from our community.</td> </tr> </table> <p dir="ltr" align="left">We appreciate your support and understanding and thank you for your prompt attention to this matter.<br> <br> Regards, <p> Chase Bank - Chase Online® Banking Department</p> <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%"> <tr> <td width="100%" bgcolor="#004F4F"> <p align="center"><b><font color="#FFFFFF">© 2005 JPMorgan Chase & Co.</font></b> </td> </tr> <tr> <td width="100%"> <p dir="ltr" align="center"><font size="2" color="#999999">Please do not reply to this email as this is only a notification. Mail sent to this address cannot be answered.</font></p> </td> </tr> <tr> <td width="100%" bgcolor="#004F4F"> <div align="center"><font color="#FFFFFF">Chase Online® Banking Departament</font></div> </td> </tr> </table> </td> </tr> </table> </xbody> </html> |
|
From: Five M. R. <la...@da...> - 2006-02-27 22:58:46
|
=09=09 =09=09 =09=09 =09=09 =09=09 =E0=ED =E0=E9=F0=EA =F8=E5=E0=E4 =EE=E5= =E3=F2=E4 =E6=E5 =F0=E0 =EC=E7=F5 =EB=E0=EF if You Can't See This, Press H= ere =09 =09=09 =09=09=09 =09=09=09=09 =09 =F0=E0 =EC=E4=F1=E9=F8 =E0=FA =F9=EE=E9 = =EE=F8=F9=E9=EE=FA =E4=FA=F4=E5=F6=E4 Please Remove my Name=20= |
|
From: Ari T. <ar...@vi...> - 2006-01-31 15:03:27
|
Jason, thank you. -Ari Turpeinen |
|
From: Jason C. <ja...@me...> - 2006-01-30 17:27:33
|
Ari,
I would think that you could just do something like:
class Registration(formencode.Schema):
first_name = validators.String(not_empty=True)
last_name = validators.String(not_empty=True)
email = validators.Email(resolve_domain=True)
def someMethodCalledFromTheWeb(name, value):
new_value = Registration.fields[name].to_python(value).
I you wanted to reuse the definitions that are already in the schema..
Jason
On Jan 28, 2006, at 6:04 PM, Ari Turpeinen wrote:
> Hi,
>
> Is there a way to use just one validator out of a schema?
>
> I use javascript on the client-side to send a request
> asking "is this input field ok?" when the field loses focus.
> It would be great if I could somehow reuse a part of a schema
> without having a full dictionary of values.
>
> Any links to documentation I may have missed greatly appreciated.
>
> -Ari Turpeinen
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep through
> log files
> for problems? Stop! Download the new AJAX search engine that makes
> searching your log files as easy as surfing the web. DOWNLOAD
> SPLUNK!
> http://sel.as-us.falkag.net/sel?
> cmd=lnk&kid=103432&bid=230486&dat=121642
> _______________________________________________
> FormEncode-discuss mailing list
> For...@li...
> https://lists.sourceforge.net/lists/listinfo/formencode-discuss
|
|
From: Ari T. <ar...@vi...> - 2006-01-29 02:03:22
|
Hi, Is there a way to use just one validator out of a schema? I use javascript on the client-side to send a request asking "is this input field ok?" when the field loses focus. It would be great if I could somehow reuse a part of a schema without having a full dictionary of values. Any links to documentation I may have missed greatly appreciated. -Ari Turpeinen |
|
From: Ian B. <ia...@co...> - 2006-01-27 04:11:50
|
Randall Smith wrote: > Simple issue. I'm just starting to use FormEncode (with TurboGears). > The Int validator's behavior doesn't allow for None. What is a good > approach for gaining this functionality. Should I create a new > validator like Int that can accept None or combine existing validators > some how or something else? If you pass if_empty=None to the validator, None will return None (as will ''). I've been thinking of changing this to default to behavior like this, but haven't had a chance. -- Ian Bicking | ia...@co... | http://blog.ianbicking.org |
|
From: Randall S. <ra...@tn...> - 2006-01-27 03:21:18
|
Simple issue. I'm just starting to use FormEncode (with TurboGears). The Int validator's behavior doesn't allow for None. What is a good approach for gaining this functionality. Should I create a new validator like Int that can accept None or combine existing validators some how or something else? Randall |
|
From: Ian B. <ia...@co...> - 2006-01-26 20:07:32
|
I thought I should note that there's a pending patch to FormEncode for internationalizing the messages. I also just realized it was mailed to me personally, not to the list. Anyway, I uploaded the files here: http://sourceforge.net/tracker/index.php?func=detail&aid=1415649&group_id=91231&atid=596418 The tests need to be converted to py.test style, and just some general review because I haven't looked at it, and they weren't provided as patches, just as replacement files, so they are probably a bit out of sync now. I do want to integrate these, but have not, and I figure I should at least get them out in public instead of sitting only in my mailbox. -- Ian Bicking / ia...@co... / http://blog.ianbicking.org |
|
From: Adam S. <asv...@gm...> - 2006-01-26 00:11:54
|
> I too am unsure. If I change that to unicode() instead of str(), then > everything will be unicode, which means any non-ascii strings will break > the system. And maybe that's fine. But I can't think of any way to > keep str stuff as str, and unicode stuff as unicode. Keeping both does seem difficult, maybe if it's somehow possible to keep the msg-values as a (nested) list of strings and let the user sort out the mess in the end. I'm probably lacking some undrestanding of how it all fits together here, but maybe there could be one Invalid class for singles and another for compounds, and the single Invalid takes msg-strings while the compound one takes a list? But for the simpler either-or case, how about some kind of use_unicode_messages keyword for the schemas? |
|
From: Ian B. <ia...@co...> - 2006-01-25 16:35:56
|
Adam Svanberg wrote: > I'm having some problems trying to use unicode strings as custom messages. > > formencode.schema.format_compound_error: > > if isinstance(v, Exception): > return str(v) > > I'm really not sure what the best solution would be here. I too am unsure. If I change that to unicode() instead of str(), then everything will be unicode, which means any non-ascii strings will break the system. And maybe that's fine. But I can't think of any way to keep str stuff as str, and unicode stuff as unicode. -- Ian Bicking / ia...@co... / http://blog.ianbicking.org |
|
From: Adam S. <asv...@gm...> - 2006-01-25 11:50:26
|
Hello,
I'm having some problems trying to use unicode strings as custom messages.
formencode.schema.format_compound_error:
if isinstance(v, Exception):
return str(v)
I'm really not sure what the best solution would be here.
--
Adam
|