Keep the rule type selection after input errors on firewall rule
If the user: a) Edit a firewall rule b) Select "single host or alias" c) Enter an invalid IP address that is not an alias d) Press "Save" The error is displayed "1.2.3.999 is not a valid source IP address or alias" But note that the rule type dropdown has changed to "Network".
In the case where there is $_POST data, we do not want to try and deduce the srctype or dsttype from the IP address in the src or dst field, because the value of that field could be the very invalid data that the user entered. We want to maintain the value of srctype or dsttype that the user selected and let them correct the error they made in typing the actual IP address. (cherry picked from commit 38ce4a18324aaceb76a976d08d0015bdc5be8bf7)
Keep the rule type selection after input errors on firewall rule
If the user:
a) Edit a firewall rule
b) Select "single host or alias"
c) Enter an invalid IP address that is not an alias
d) Press "Save"
The error is displayed "1.2.3.999 is not a valid source IP address or alias"
But note that the rule type dropdown has changed to "Network".
In the case where there is $_POST data, we do not want to try and deduce the srctype or dsttype from the IP address in the src or dst field, because the value of that field could be the very invalid data that the user entered. We want to maintain the value of srctype or dsttype that the user selected and let them correct the error they made in typing the actual IP address.
(cherry picked from commit 38ce4a18324aaceb76a976d08d0015bdc5be8bf7)