X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=lib%2FCGI%2FEx%2Fvalidate.js;h=d8a62704c4bfdfe04b9ac0f212f0187d46e5fe94;hb=refs%2Ftags%2Fv2.04;hp=a3b98ebb912a2ce16457fadbd88fba1554542340;hpb=d2b7c937e86e6e8c4b4193e9f4a8da075919b4fd;p=chaz%2Fp5-CGI-Ex diff --git a/lib/CGI/Ex/validate.js b/lib/CGI/Ex/validate.js index a3b98eb..d8a6270 100644 --- a/lib/CGI/Ex/validate.js +++ b/lib/CGI/Ex/validate.js @@ -4,7 +4,7 @@ * Based upon CGI/Ex/Validate.pm v1.14 from Perl * * For instructions on usage, see perldoc of CGI::Ex::Validate * ***----------------------------------------------------------------**/ -// $Revision: 1.35 $ +// $Revision: 1.36 $ function Validate () { this.error = vob_error; @@ -292,7 +292,8 @@ function vob_validate_buddy (form, field, field_val, N_level, ifs_match) { for (var i = 0; i < tests.length; i ++) { var el = form[field]; var type = el.type; - if (type && (type == 'hidden' || type == 'password' || type == 'text' || type == 'textarea' || type == 'submit')) el.value = values[0] = field_val[tests[i]]; + if (type && (type == 'hidden' || type == 'password' || type == 'text' || type == 'textarea' || type == 'submit')) + el.value = values[0] = '' + field_val[tests[i]]; } }