diff --git a/test/src/Antd.tsx b/test/src/Antd.tsx
index 538a212..e05bc37 100644
--- a/test/src/Antd.tsx
+++ b/test/src/Antd.tsx
@@ -1,4 +1,15 @@
-import { Button, Checkbox, Input, InputNumber, Radio, Select, Switch, TreeSelect } from 'antd'
+import {
+ Button,
+ Checkbox,
+ DatePicker,
+ Input,
+ InputNumber,
+ Radio,
+ Select,
+ Switch,
+ TimePicker,
+ TreeSelect
+} from 'antd'
import { Verifications, useAttr, useFormData } from 'hook-form-react'
import { Antd_5 } from 'hook-form-react/Antd_5'
import { animals, treeData } from './data'
@@ -11,7 +22,7 @@ export default function Antd() {
value11: 1,
value6: true,
value2: false,
- value7: [],
+ value7: [] as string[],
value3: [],
value4: {},
value5: '',
@@ -20,7 +31,8 @@ export default function Antd() {
{
value: [Verifications.required()],
value5: [Verifications.required()],
- value8: [Verifications.required()],
+ value7: [Verifications.minLenth(2, '请选择时间范围')],
+ value8: [Verifications.required('请选择时间')],
value10: [Verifications.min(10)]
}
)
@@ -56,7 +68,21 @@ export default function Antd() {
- {JSON.stringify(formData.value, null, 1)} --
{JSON.stringify(value10, null, 1)}-
- {JSON.stringify(formData.errors, null, 1)} --
- {JSON.stringify(value10Form.errors, null, 1)} -+
+ {JSON.stringify(formData.value, null, 1)} ++
+ {JSON.stringify(value10, null, 1)} ++
+ {JSON.stringify(formData.errors, null, 1)} ++
+ {JSON.stringify(value10Form.errors, null, 1)} ++