diff --git a/packages/vant/src/form/README.md b/packages/vant/src/form/README.md index e5d0b9686..1661635a9 100644 --- a/packages/vant/src/form/README.md +++ b/packages/vant/src/form/README.md @@ -115,7 +115,7 @@ export default { setup() { const value1 = ref(''); const value2 = ref(''); - const value3 = ref(''); + const value3 = ref('abc'); const value4 = ref(''); const pattern = /\d{6}/; @@ -129,7 +129,7 @@ export default { setTimeout(() => { Toast.clear(); - resolve(/\d{6}/.test(val)); + resolve(val === '1234'); }, 1000); }); diff --git a/packages/vant/src/form/README.zh-CN.md b/packages/vant/src/form/README.zh-CN.md index 3b3c36d24..6b58ff3e6 100644 --- a/packages/vant/src/form/README.zh-CN.md +++ b/packages/vant/src/form/README.zh-CN.md @@ -123,7 +123,7 @@ export default { setup() { const value1 = ref(''); const value2 = ref(''); - const value3 = ref(''); + const value3 = ref('abc'); const value4 = ref(''); const pattern = /\d{6}/; @@ -140,7 +140,7 @@ export default { setTimeout(() => { Toast.clear(); - resolve(/\d{6}/.test(val)); + resolve(val === '1234'); }, 1000); });