]> Dogcows Code - chaz/p5-CGI-Ex/blobdiff - lib/CGI/Ex/validate.js
CGI::Ex 2.24
[chaz/p5-CGI-Ex] / lib / CGI / Ex / validate.js
index ad80759bdce2a6f822ed4c2f2662aae775852ad2..51e68af3ee3fe82637253685784971d7880d9f46 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright 2007 - Paul Seamons - $Revision: 1.73 $
+// Copyright 2007 - Paul Seamons - $Revision: 1.74 $
 // Distributed under the Perl Artistic License without warranty
 // See perldoc CGI::Ex::Validate for usage
 
@@ -533,10 +533,7 @@ function v_check_type (value, type, field, form) {
   if (value.match(/^[.\-]/))             return 0;
   if (value.match(/(\.-|-\.|\.\.)/))  return 0;
   if (! (m = value.match(/^(.+\.)([a-z]{2,10})$/))) return 0;
-  if (m[2] == 'name') {
-   if (! m[1].match(/^([a-z0-9\-]{1,62}\.){2}$/)) return 0;
-  } else
-   if (! m[1].match(/^([a-z0-9\-]{1,62}\.)+$/)) return 0;
+  if (! m[1].match(/^([a-z0-9\-]{1,62}\.)+$/)) return 0;
 
  } else if (type == 'URL') {
   if (! value) return 0;
This page took 0.018295 seconds and 4 git commands to generate.