wrote user and post model validations