Copilot commented on code in PR #13325:
URL: https://github.com/apache/cloudstack/pull/13325#discussion_r4279943826


##########
ui/src/views/offering/AddVpcOffering.vue:
##########
@@ -755,6 +767,12 @@ export default {
     },
     closeAction () {
       this.$emit('close-action')
+    },
+    async validateNetworkRate (rule, value) {
+      if (value && (isNaN(value) || value < -1)) {
+        return Promise.reject(this.$t('message.error.number'))
+      }

Review Comment:
   The text input accepts `1.5` or `-0.5` because this validator only checks 
that the value is numeric and at least `-1`. `publicnetworkrate` is an integer 
API parameter, so the form submits these values only for the API to reject 
them. Require a whole-number string in the supported range before submitting.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to