create: Do not allow only numbers in name

This commit is contained in:
tschettervictor
2025-01-20 19:25:02 -07:00
committed by GitHub
parent 342087c5c9
commit d4d747de05

View File

@@ -68,6 +68,8 @@ validate_name() {
error_exit "Container names may not begin with (-|_) characters!"
elif [ "${NAME_VERIFY}" != "${NAME_SANITY}" ]; then
error_exit "Container names may not contain special characters!"
elif echo "${NAME_VERIFY}" | grep -qE '^[0-9]+$'; then
error_exit "Container names may not contain only numbers."
fi
}