Added validation for post submission
Added validation for post edit