WTF was I thinking with this validator check?

This commit is contained in:
Chris 2012-08-01 12:33:42 +01:00
parent 1e2d7a5267
commit 5d56f4e7ff

View File

@ -201,8 +201,8 @@ sub validate_string {
# Is the string too short (we only need to check if it's required or has content) ? If so, store it and return an error. # Is the string too short (we only need to check if it's required or has content) ? If so, store it and return an error.
return ($text, $self -> {"template"} -> replace_langvar("BLOCK_VALIDATE_TOOSHORT", "", {"***field***" => $settings -> {"nicename"}, return ($text, $self -> {"template"} -> replace_langvar("BLOCK_VALIDATE_TOOSHORT", "", {"***field***" => $settings -> {"nicename"},
"***minlen***" => $settings -> {"minlen"}})) "***minlen***" => $settings -> {"minlen"}}))
if(($settings -> {"required"} || length($text)) && $settings -> {"minlen"} && length($text) < $settings -> {"minlen"}); if($settings -> {"minlen"} && length($text) < $settings -> {"minlen"});
# Get here and all the tests have been passed or skipped # Get here and all the tests have been passed or skipped
return ($text, undef); return ($text, undef);