change validation so input preserves in form