Consider two integral curves $X,Y$ over an arbitrary base field $K$. Assume that $X$ is regular, $Y$ proper and there exists an open subset $U \subset X$ such that there exists a morphism $f_U: U \to Y$.
When and why can this map be extended to $f_X:X \to Y$ ? Is futhermore the condition that $X$ is regular necessary ?