fix(ui): zod schema refiners must return boolean

This commit is contained in:
psychedelicious
2024-11-16 13:53:11 -08:00
parent c813fa3fc0
commit 6b53a48b48

View File

@@ -302,6 +302,7 @@ const zStringFieldInputTemplate = zFieldInputTemplateBase
if (val.maxLength !== undefined && val.minLength !== undefined) {
return val.maxLength >= val.minLength;
}
return true;
},
{ message: 'maxLength must be greater than or equal to minLength' }
);
@@ -406,6 +407,7 @@ const zImageFieldCollectionInputTemplate = zFieldInputTemplateBase
if (val.maxLength !== undefined && val.minLength !== undefined) {
return val.maxLength >= val.minLength;
}
return true;
},
{ message: 'maxLength must be greater than or equal to minLength' }
);