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 4e8b406 commit 52031cfCopy full SHA for 52031cf
packages/connect-react/src/hooks/form-context.tsx
@@ -188,8 +188,14 @@ export const FormContextProvider = <T extends ConfigurableProps>({
188
errs.push("not a boolean");
189
}
190
} else if (prop.type === "string") {
191
+ const { min = 1, max } = prop as unknown as { min?: number, max?: number }
192
if (typeof value !== "string") {
193
errs.push("not a string");
194
+ } else {
195
+ if (value.length < min)
196
+ errs.push("string too short");
197
+ if (max && value.length > max)
198
+ errs.push("string too long");
199
200
} else if (prop.type === "app") {
201
const field = fields[prop.name]
0 commit comments