Added validator class for models