Refactor validation code