Move validate logic to model