Validator icon indicating copy to clipboard operation
Validator copied to clipboard

Async Validation Functions Fail

Open lesichkovm opened this issue 3 years ago • 0 comments
trafficstars

Functions defined as async always pass the validation, even if they return false

function validateUserExists(name, value, params) {
  const user = await db.users.findOne({ where: { id: value } })
  return user != null ? true : false
}

lesichkovm avatar Jun 07 '22 05:06 lesichkovm