# Valuative criterion to extend morphism of schemes

Let $k$ be an algebraically closed field, $X, Y$ integral $k$-schemes and $Y$ proper over $k$. Let $U$ be a non-empty open subset $U \subset X$ and $f:U \to Y$ a morphism of finite-type. Suppose that for any closed point $x \in X \backslash U$, any DVR $R$ with fraction field $K$, residue field $k$ and any morphism $\phi:\mathrm{Spec}(R) \to X$ with $\phi(\mathrm{Spec}(K)) \in U$ and $\phi(\mathrm{Spec}(k))=x$ we have that the unique morphim $\phi_f:\mathrm{Spec}(R) \to Y$ lifting the morphism $$\mathrm{Spec}(K) \xrightarrow{\phi} U \xrightarrow{f} Y$$ satisfies the property $y(x):=\phi_f(\mathrm{Spec}(k))$ does not depend on the choice of the DVR $R$ or the morphism $\phi$ (i.e., $y(x)$ depends only on the choice of $x$). Does this imply that the morphism morphism $f$ extend to a morphism $\tilde{f}:X \to Y$ such that $\tilde{f}(x)=y(x)$ for all closed $x \in X\backslash U$?

No. Take $X$ to be a projective curve with one cusp at $x$, $U:=X\smallsetminus\{x\}$, $Y=$ the normalization of $X$, $f=$ the section of $Y\to X$ over $U$.
[Edit after Ron's comment] The answer is yes if $X$ is normal. Let $X'\subset X\times Y$ be the closure of the graph of $f$. Then $\pi:X'\to X$ induced by the first projection is proper, and is an isomorphism above $U$. The assumption implies that $\pi$ is bijective on closed points. In particular, $\pi$ is finite birational, hence an isomorphism if $X$ is normal.