-
Notifications
You must be signed in to change notification settings - Fork 1.2k
UI: Add validator for CIDR being passed #11465
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #11465 +/- ##
=========================================
Coverage 17.35% 17.35%
- Complexity 15230 15235 +5
=========================================
Files 5886 5886
Lines 525685 525701 +16
Branches 64159 64159
=========================================
+ Hits 91247 91258 +11
- Misses 424138 424144 +6
+ Partials 10300 10299 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@@ -417,7 +419,7 @@ export default { | |||
}, | |||
updateCidrRule () { | |||
if (!this.selectedVpcOfferingHavingRoutedNetworkMode) { | |||
this.rules.cidr = [{ required: true, message: this.$t('message.error.required.input') }] | |||
this.rules.cidr = [{ validator: isValidIPv4Cidr }] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no more message or required?
@@ -417,7 +419,7 @@ export default { | |||
}, | |||
updateCidrRule () { | |||
if (!this.selectedVpcOfferingHavingRoutedNetworkMode) { | |||
this.rules.cidr = [{ required: true, message: this.$t('message.error.required.input') }] | |||
this.rules.cidr = [{ validator: isValidIPv4Cidr }] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this.rules.cidr = [{ validator: isValidIPv4Cidr }] | |
this.rules.cidr = [{ required: true, message: this.$t('message.error.required.input') }, { validator: isValidIPv4Cidr, trigger: 'change' }] |
maybe
@@ -102,3 +102,25 @@ export function toCsv ({ keys = null, data = null, columnDelimiter = ',', lineDe | |||
|
|||
return result | |||
} | |||
|
|||
export function isValidIPv4Cidr (rule, value) { | |||
console.log('here') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
console.log('here') |
Description
This PR fixes: #11405
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Screenshots (if appropriate):
How Has This Been Tested?
How did you try to break this feature and the system with this change?