TT#29617 automatically generate form exceptions for validation

exceptions here means, the fields are not automatically changed to
the format {field}{id} for form validation because a field named
{field_id} is present in the form anyway.

Change-Id: I64b8e3ca1864c2b3b2697a69f87cfba17683bd19
changes/23/18123/3
Gerhard Jungwirth 8 years ago
parent 0f3c6602c0
commit d36902191a

@ -169,13 +169,11 @@ sub validate_form {
my $resource = $params{resource};
my $form = $params{form};
my $run = $params{run} // 1;
my $exceptions = $params{exceptions} // [];
my $form_params = $params{form_params} // {};
if(!@$exceptions && $form->can('validation_exceptions')){
$exceptions = $form->validation_exceptions;
}
push @{ $exceptions }, "external_id";
my $exceptions = [
grep {m/_id$/} map {"".$_->name} $form->fields
];
my @normalized = ();

Loading…
Cancel
Save