refactor dsl validation