Hi there, how can i validate input fields in Zope? If somebody fills something in a input field and i expect an email-adress, how can i check the right syntax? I know how to do it in perl with regular expressions but in Zope/Python...i must learn :) Juergen
On Thu, 26 Aug 1999, Juergen Specht wrote:
Hi there,
how can i validate input fields in Zope? If somebody fills something in a input field and i expect an email-adress, how can i check the right syntax? Well, try this: <dtml-if "'@' in field"> GOOD Email address? </dtml-if>
I know how to do it in perl with regular expressions but in Well, somebody posted a patch or so to add the regular expression module functionality to the DTML namespace ;)
Andreas -- Andreas Kostyrka | andreas@mtg.co.at phone: +43/1/7070750 | phone: +43/676/4091256 MTG Handelsges.m.b.H. | fax: +43/1/7065299 Raiffeisenstr. 16/9 | 2320 Zwoelfaxing AUSTRIA
Andreas Kostyrka wrote:
On Thu, 26 Aug 1999, Juergen Specht wrote:
Hi there,
how can i validate input fields in Zope? If somebody fills something in a input field and i expect an email-adress, how can i check the right syntax? Well, try this: <dtml-if "'@' in field"> GOOD Email address? </dtml-if>
I know how to do it in perl with regular expressions but in Well, somebody posted a patch or so to add the regular expression module functionality to the DTML namespace ;)
Or you can do a External Module to use Regular Expressions... -- Mauricio Souza Lima <mauricio@hiper.com.br> Hiperlógica <http://hiper.com.br> Automação de web-sites | Website automation São Paulo | Brasil | Fone: +55-11-251-4894
Andreas Kostyrka wrote:
how can i validate input fields in Zope? If somebody fills something in a input field and i expect an email-adress, how can i check the right syntax? Well, try this: <dtml-if "'@' in field"> GOOD Email address? </dtml-if> Mhm, but this is only a basic check that there is an @ in it. Everybody can use the following strings: @@ bla@bla @bla@ @
not so good...
I know how to do it in perl with regular expressions but in Well, somebody posted a patch or so to add the regular expression module functionality to the DTML namespace ;) Good idea, volunteers anywhere? :)
Juergen
On Thu, 26 Aug 1999, Juergen Specht wrote:
I know how to do it in perl with regular expressions but in Well, somebody posted a patch or so to add the regular expression module functionality to the DTML namespace ;) Good idea, volunteers anywhere? Well, it's not about volunteers to much. Doing this is basically nonwork. (I didn't look at it, but the work ranges in the 1 line change area. Well, it might be work, if one would have to write secure wrappers or something like this. But "re" should be secure by default ;) )
It's much more about getting the DC guys to commit it to CVS ;) Andreas -- Andreas Kostyrka | andreas@mtg.co.at phone: +43/1/7070750 | phone: +43/676/4091256 MTG Handelsges.m.b.H. | fax: +43/1/7065299 Raiffeisenstr. 16/9 | 2320 Zwoelfaxing AUSTRIA
participants (3)
-
Andreas Kostyrka -
Juergen Specht -
Mauricio