Update code to add/update/view a blog post and validation before saving blog