Update Post.php

Added form validation for adding and editing posts.