diff --git a/func/main.sh b/func/main.sh index c9d4885667..c8765bdb1f 100644 --- a/func/main.sh +++ b/func/main.sh @@ -1161,8 +1161,9 @@ is_cron_format_valid() { # Validate CPU Quota: is_valid_cpu_quota() { - if [[ ! "$1" =~ ^[0-9]+%$ ]]; then - check_result "$E_INVALID" "Invalid CPU Quota format :: $1" + local cpu_quota="$1" + if [[ ! "$cpu_quota" =~ ^[1-9][0-9]*%$ ]]; then + check_result "$E_INVALID" "Invalid CPU Quota format: $cpu_quota" fi }