Replies: 2 comments
-
Ok, I changed my validation logic like this: const validation = Yup.object().shape({
domainName: Yup.string()
.required('The website URL is required')
.matches(URL_REGEX, 'Enter correct URL')
})
.test({
message: () => 'Cloudflare is not supported',
test: debounce(async ({ domainName }) => {
const res = await checkCloudflareStatus(domainName).unwrap()
if (!res.on_cloudflare) {
return false
}
return true
}, DEBOUNCE_TIME),
}) It sends the request to the API without problems and I'm getting the response as
|
Beta Was this translation helpful? Give feedback.
0 replies
-
Any other advice please? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello. How can solve my problem? The event.currentTarget.value is one step behind the Formik values
When I change the input I get the result in my console:
![image](https://private-user-images.githubusercontent.com/64611024/358535092-4469ed31-7c27-4af6-84c4-ac114ad0b5a3.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg5Mzc2NjcsIm5iZiI6MTczODkzNzM2NywicGF0aCI6Ii82NDYxMTAyNC8zNTg1MzUwOTItNDQ2OWVkMzEtN2MyNy00YWY2LTg0YzQtYWMxMTRhZDBiNWEzLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA3VDE0MDkyN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWQxNzNjMzdjM2M1ZWMwODc4YzZjMzhkMmQwNjNkMDIxN2QxOWI0OWFhZjUyNGVkNDc3OWFmNTVkMjE1NTcyZGUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.JuzNyn4wtBYwouWAhhmbDJ9aPzalKVwABx5JCb9efT4)
Beta Was this translation helpful? Give feedback.
All reactions