Validator
Validator copied to clipboard
Async Validation Functions Fail
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
}