From 61b0d0bd49d21b4cc567385ee41e7677b9f65651 Mon Sep 17 00:00:00 2001 From: Jeff Mealo Date: Fri, 29 Nov 2024 11:47:38 -0500 Subject: [PATCH] Remove decimal support --- src/common/components/configurationForm/totalMemoryInput.jsx | 4 ++-- src/common/components/configurationForm/validation.js | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/common/components/configurationForm/totalMemoryInput.jsx b/src/common/components/configurationForm/totalMemoryInput.jsx index 438ca5e..99e4e09 100644 --- a/src/common/components/configurationForm/totalMemoryInput.jsx +++ b/src/common/components/configurationForm/totalMemoryInput.jsx @@ -48,8 +48,8 @@ const TotalMemoryInput = ({ tooltip }) => { required="required" min={1} max={MAX_NUMERIC_VALUE} - step="any" - pattern="[0-9]+([.][0-9]+)?" + step={1} + pattern="[0-9]{1,6}" placeholder="Memory size (RAM, required)" /> { if (totalMemoryUnit === SIZE_UNIT_MB) { - return schema - .min(MIN_MB_MEMORY, `Must be greater than or equal to ${MIN_MB_MEMORY} MB`) - .integer() + return schema.min(MIN_MB_MEMORY, `Must be greater than or equal to ${MIN_MB_MEMORY} MB`) } return schema.min(1, 'Must be greater than zero') })