Refactor validate clauses