Fixed and enhanced vlan field validation in the UI #10983
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR fixes and enhances the validation of the values inserted in the VLAN/VNI field when configuring a new zone. Currently, it only checks if any of the fields are empty and if the range start value is greater than the range end value. Thus, it is possible to insert invalid values, as negatives.
With the PR changes, now the field validates if: any of the values is negative, any of the fields is empty or if the inserted values are inside the isolation method max and min values. The maximum and minimum values are now defined based on the selected isolation method (isolation method limits used can be find in the
NetworkServiceImpl
class). This PR also fixes a minor graphical issue, where the field displayed a red check icon, instead of a red error icon.Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Screenshots (if appropriate):
Before the changes:

After the changes:

How Has This Been Tested?
VLAN
VXLAN
GRE