// Distributed under the Perl Artistic License without warranty
// See perldoc CGI::Ex::Validate for usage
// Distributed under the Perl Artistic License without warranty
// See perldoc CGI::Ex::Validate for usage
if (value.match(/^[.\-]/)) return 0;
if (value.match(/(\.-|-\.|\.\.)/)) return 0;
if (! (m = value.match(/^(.+\.)([a-z]{2,10})$/))) return 0;
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;