valid: add generic validation