add client side validation for posts