Add validation on edits to UI