From d5431665e9d1bfc5603ce0ecaa10d395dafdc14a Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Fri, 28 May 2021 19:52:30 +0100 Subject: [PATCH] Fixing issue with min/max in numbers. --- packages/standard-components/src/forms/validation.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/standard-components/src/forms/validation.js b/packages/standard-components/src/forms/validation.js index 5b49fa0848..8433705e0a 100644 --- a/packages/standard-components/src/forms/validation.js +++ b/packages/standard-components/src/forms/validation.js @@ -77,6 +77,9 @@ const lengthConstraint = maxLength => value => { } const numericalConstraint = (constraint, error) => value => { + if (value == null || value === "") { + return null + } if (isNaN(value)) { return "Must be a number" }