diff --git a/src/components/form/CheckboxField.tsx b/src/components/form/CheckboxField.tsx index 6bd53873..a7a6970f 100644 --- a/src/components/form/CheckboxField.tsx +++ b/src/components/form/CheckboxField.tsx @@ -51,7 +51,7 @@ const CheckboxField: React.FC = ({ validate: async (value) => { if (validate instanceof BooleanSchema) { try { - validate.validateSync(value); + await validate.validate(value); } catch (error) { if (error instanceof ValidationError) { return error.errors[0]; diff --git a/src/components/form/TextField.tsx b/src/components/form/TextField.tsx index 64ed2920..f1c167a3 100644 --- a/src/components/form/TextField.tsx +++ b/src/components/form/TextField.tsx @@ -75,7 +75,7 @@ const _TextField: React.FC { if (validate instanceof Schema) { try { - validate.validateSync(value); + await validate.validate(value); } catch (error) { if (error instanceof ValidationError) { return error.errors[0];