We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7f7884b commit 31e9ca3Copy full SHA for 31e9ca3
packages/react-form-renderer/src/validators/index.js
@@ -21,7 +21,11 @@ export const length = memoize(({
21
equal = selectNum(equal, is);
22
min = selectNum(min, minimum);
23
max = selectNum(max, maximum);
24
- return prepare ((value = []) => {
+ return prepare ((value) => {
25
+ if (!value) {
26
+ return;
27
+ }
28
+
29
if (equal !== null && value.length !== equal) {
30
const msg = prepareMsg(message, 'wrongLength', { count: equal }).defaultMessage;
31
return typeof msg === 'string' ? msg : msg(equal);
0 commit comments