Added a custom model validator