added validations on post page