Add validation to models and make it work properly