Added validation to new/edit post form