refactor customer validator