From b206ec4446f8abc1397afb580cf7ef952d5f4329 Mon Sep 17 00:00:00 2001 From: Julien Semaan Date: Wed, 15 May 2019 12:48:17 -0400 Subject: [PATCH] disable uplink dynamic validation in server side commit diff contains comment + explanation --- .../lib/pfappserver/Form/Config/Switch.pm | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/html/pfappserver/lib/pfappserver/Form/Config/Switch.pm b/html/pfappserver/lib/pfappserver/Form/Config/Switch.pm index fb1b2e9145f9..973b72f1807d 100644 --- a/html/pfappserver/lib/pfappserver/Form/Config/Switch.pm +++ b/html/pfappserver/lib/pfappserver/Form/Config/Switch.pm @@ -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