added some validation, post add/edit working