diff --git a/packages/workflow/src/TypeValidation.ts b/packages/workflow/src/TypeValidation.ts index 456b2e71fef35..6b1557af8369c 100644 --- a/packages/workflow/src/TypeValidation.ts +++ b/packages/workflow/src/TypeValidation.ts @@ -331,9 +331,10 @@ export function validateFieldType( } case 'number': { try { - return strict - ? { valid: false, errorMessage: defaultErrorMessage } - : { valid: true, newValue: tryToParseNumber(value) }; + if (strict && typeof value !== 'number') { + return { valid: false, errorMessage: defaultErrorMessage }; + } + return { valid: true, newValue: tryToParseNumber(value) }; } catch (e) { return { valid: false, errorMessage: defaultErrorMessage }; }