Adds validations for attachment, comment, post and user models.