Client-side model validation
Small refactor