formvalid update logic