refactor option validation to support tooling