async:true
into the keyword objectconst extend = {
keywords: {
checkUser: {
async: true, // <<---
validate: (field, value) =>
simulateAsyncFindUserCall({ [field]: value })
.then((items) => (items.length === 0)),
},
},
};
$async:true
into the json-schema as wellconst schema = {
$async: true, // <<---
type: 'object',
properties: {
...
},
};
Read more about Asynchronous Validation on the official epoberezkin/ajv documentation.