edit posts and validation implemented