Skip to content

Commit

Permalink
disable uplink dynamic validation in server side
Browse files Browse the repository at this point in the history
commit diff contains comment + explanation
  • Loading branch information
julsemaan committed May 15, 2019
1 parent 0091086 commit b206ec4
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions html/pfappserver/lib/pfappserver/Form/Config/Switch.pm
Expand Up @@ -816,11 +816,13 @@ sub validate {
}
}

if ($self->value->{uplink_dynamic} ne 'dynamic') {
unless ($self->value->{uplink} && $self->value->{uplink} =~ m/^(\d(,\s*)?)*$/) {
$self->field('uplink')->add_error("The uplinks must be a list of ports numbers.");
}
}
# Temporarily disabled as new admin sends uplink_dynamic as undef which has this evaluated everytime although the inherited value might be 'dynamic'
# The frontend does a validation of this requirement
#if ($self->value->{uplink_dynamic} ne 'dynamic') {
# unless ($self->value->{uplink} && $self->value->{uplink} =~ m/^(\d(,\s*)?)*$/) {
# $self->field('uplink')->add_error("The uplinks must be a list of ports numbers.");
# }
#}
}

=head1 COPYRIGHT
Expand Down

0 comments on commit b206ec4

Please sign in to comment.