From cd540e9641bc1f90782e39050f2f23e1229bda16 Mon Sep 17 00:00:00 2001 From: guru_sainath Date: Tue, 9 Jul 2024 15:31:12 +0530 Subject: [PATCH] [WEB-1908] chore: update input type number validation to type text in estimate input form (#5086) * chore: removed input type number validation in estimate input form * chore: removed pattern --- web/core/components/estimates/points/create.tsx | 5 +---- web/core/components/estimates/points/update.tsx | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/web/core/components/estimates/points/create.tsx b/web/core/components/estimates/points/create.tsx index 0c05beaba9..d4e01ee9f6 100644 --- a/web/core/components/estimates/points/create.tsx +++ b/web/core/components/estimates/points/create.tsx @@ -152,11 +152,8 @@ export const EstimatePointCreate: FC = observer((props) => }; // derived values - const inputFieldType = - estimateType && [(EEstimateSystem.TIME, EEstimateSystem.POINTS)].includes(estimateType) ? "number" : "text"; const inputProps = { - type: inputFieldType, - pattern: inputFieldType === "number" ? "[0-9]*" : undefined, + type: "text", maxlength: MAX_ESTIMATE_POINT_INPUT_LENGTH, }; diff --git a/web/core/components/estimates/points/update.tsx b/web/core/components/estimates/points/update.tsx index cde02c2a0b..dce9a4289e 100644 --- a/web/core/components/estimates/points/update.tsx +++ b/web/core/components/estimates/points/update.tsx @@ -160,11 +160,8 @@ export const EstimatePointUpdate: FC = observer((props) => }; // derived values - const inputFieldType = - estimateType && [(EEstimateSystem.TIME, EEstimateSystem.POINTS)].includes(estimateType) ? "number" : "text"; const inputProps = { - type: inputFieldType, - pattern: inputFieldType === "number" ? "[0-9]*" : undefined, + type: "text", maxlength: MAX_ESTIMATE_POINT_INPUT_LENGTH, };