Unknown values must reject saving

This commit is contained in:
Xavier Guimard 2015-12-30 18:32:05 +00:00
parent 74a708838f
commit 8eed3ce519

View File

@ -669,6 +669,7 @@ sub _unitTest {
# Check if key exists
unless ( $attr = $attrs->{$key} ) {
push @{ $self->errors }, { message => "__unknownKey__: $key" };
$res = 0;
next;
}
if ( $key =~ $simpleHashKeys ) {
@ -708,6 +709,7 @@ sub _unitTest {
unless ( $conf->{$key} =~ $test ) {
push @{ $self->errors },
{ message => "$key: $msg ($conf->{$key})" };
$res = 0;
}
}
else {