Validation refactoing