<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to 130: FormValidator Regexp</title><link>https://sourceforge.net/p/vcl4php/bugs/130/</link><description>Recent changes to 130: FormValidator Regexp</description><atom:link href="https://sourceforge.net/p/vcl4php/bugs/130/feed.rss" rel="self"/><language>en</language><lastBuildDate>Thu, 02 Oct 2008 07:18:19 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/vcl4php/bugs/130/feed.rss" rel="self" type="application/rss+xml"/><item><title>FormValidator Regexp</title><link>https://sourceforge.net/p/vcl4php/bugs/130/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;In my opinion there is a bug at all with regexp on line 219 in formvalidator.inc.php unit:&lt;/p&gt;
&lt;p&gt;Current Code:&lt;br /&gt;
echo "obj.regexp=\"$regexp\";\n"; &lt;/p&gt;
&lt;p&gt;removing the double quotes makes javascript handling the regexp right,&lt;br /&gt;
so the code on line 208 should enclose the switch-statement in an if-block.&lt;/p&gt;
&lt;p&gt;New Code:&lt;br /&gt;
if($regexp{0} == '/')&lt;br /&gt;
echo "obj.regexp=$regexp;\n";&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
switch($regexp)&lt;br /&gt;
{&lt;br /&gt;
case 'email': $regexp='JSVAL_RX_EMAIL'; break;&lt;br /&gt;
case 'telephone':$regexp='JSVAL_RX_TEL'; break;&lt;br /&gt;
case 'zip':$regexp='JSVAL_RX_ZIP'; break;&lt;br /&gt;
case 'money':$regexp='JSVAL_RX_MONEY'; break;&lt;br /&gt;
case 'creditcard':$regexp='JSVAL_RX_CREDITCARD'; break;&lt;br /&gt;
case 'postalzip':$regexp='JSVAL_RX_POSTALZIP'; break;&lt;br /&gt;
case 'postalcode':$regexp='JSVAL_RX_PC'; break;&lt;br /&gt;
}&lt;/p&gt;
&lt;p&gt;echo "obj.regexp=\"$regexp\";\n";&lt;br /&gt;
}&lt;br /&gt;
&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Alex Pierson</dc:creator><pubDate>Thu, 02 Oct 2008 07:18:19 -0000</pubDate><guid>https://sourceforge.net066af5ca4091ce41c190e882dd31a0af6779ff86</guid></item></channel></rss>