validation & edit