So I'm trying to proof that a $k$-regular bipartite graph has a $1$-factor, for $k>0$.
Proof: Let $G=(V,E)$ be a $k$-regular bipartite graph such that $E\subset\{e=\{a,b\}\in E\::a\in U, b\in W\}$ for certain $U,W\subset V$. Then certainly $|U|=|W|:=n$ and thus $|V|=2n$ since $U\cap W=\varnothing$. Because $G$ is $k$-regular, $G$ is $k$-edge colourable. Because $|E|=\frac12\sum_{v\in V}d(v)=\frac122nk=nk$, every colour is used on exactly $n$ edges, since in that case the colour is used on $2n$ different vertices, and it cannot be used on any vertex twice. Choose a colour $i$ and let $E_i=\{e\in E \ | \ k(e)=i\}$, then $G_i=(V,E_i)$ is a $1$-factor. Done.
Question: Is this proof correct, and if not how do I proof the statement? And second: obviously not every $k$-regular graph has a $1$-factor, so if my proof works, which part of my proof does not extend to any $k$-regular graph? Is it the part where I conclude that we have an even amount of edges? And if so, does a $k$-regular graph on an even amount of vertices contain a $1$-factor?
Edit: My proof does not seem exactly the same to me as the linked one; also I don't quite understand the notation and much of the terminology in the linked post, I have only followed an 80-hour course on graph theory, covering an introduction, colouring and directed graphs/edges/menger's theorem and the like. I'm looking for some feedback on my proof; is it correct?