validating posts when editing