Added validation, created partial for new and edit posts