def check(validator, value, *args, **kwargs):
  try:
    validator(*args, **kwargs)(None, value)
  except ValidationError:
    return False
  return True
Call a validator and return True if it's valid, False otherwise.
dataset/ETHPy150Open IanLewis/kay/kay/utils/validators.py/check