From 65150d368f5c3a0c9aa161e4206b5b73f49c58a8 Mon Sep 17 00:00:00 2001 From: Fran Dios Date: Wed, 24 Mar 2021 23:22:09 +0900 Subject: [PATCH] Typo in docs --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9d81f0c..f340620 100644 --- a/README.md +++ b/README.md @@ -118,10 +118,11 @@ const pattern = (v) => /^[a-z0-9_#]+$/i.test(v) || t('form.invalidPattern') // u Rules can also be asynchronous: ```js -const isUnique = async v => { +const isUnique = async (v) => { const response = await fetch(`/api/is-unique/${v}`) // Assuming API returns non-200 code when not unique return response.ok || 'Already in use' +} ``` In this case, you'll need to use `validateAsync` instead of `validate`: