Skip checks if not required and no default set.
This commit is contained in:
parent
1ecf0ab7f5
commit
ca7973e384
@ -165,8 +165,10 @@ sub validate_string {
|
||||
if($settings -> {"required"}) {
|
||||
return ("", $self -> {"template"} -> replace_langvar("BLOCK_VALIDATE_NOTSET", {"***field***" => $settings -> {"nicename"}}));
|
||||
# Otherwise fall back on the default.
|
||||
} elsif(!$settings -> {"default"}) {
|
||||
return ("", undef);
|
||||
} else {
|
||||
$text = $settings -> {"default"} || "";
|
||||
$text = $settings -> {"default"};
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user