Let $X$ be an integral scheme of finite type over field $k$, which corresponds to an irreducible variety $V$ over $k$.
I want to show that $X$ is regular in codimension one (every local ring at any point of scheme $X$ of dimension one is a regular local ring) if and only if singular points of $V$ have codimension at least two.
This question has been asked in this post, but I am stuck at the "only if" part.
Let $Y$ be an irreducible component of the singular locus of $V$, and let $\zeta$ be its generic point in $X$. Assume that $Y$ has codimension one, then $\mathcal{O}_{X,\zeta}$ has dimension one and hence is a regular local ring by assumption. In order to get a contradiction, I want to show that there is a closed point of $Y$ (corresponds to a point in the subvariety) that is not singular.
My question is:
How to implies that there is a closed point of $Y$ such that the local ring at that closed point is a regular local ring?