repocrypts / Validator

Client-side javascript validator library ports from Laravel 5.2
MIT License
46 stars 22 forks source link

Async Validation Functions Fail #43

Open lesichkovm opened 2 years ago

lesichkovm commented 2 years ago

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
}