Actually, you _can_ move it to an external file.
Use CFFORM to create the form and the validation code. When
you do this, the javascript gets compiled and rendered with every
page request. If the form doesn't change, then the javascript never
changes. Once you've reached the final version of the form, you can
copy the javascript to an external .JS file and reference it in the
HTML.
In order to keep CFFORM from re-creating the Javascript in
that page, swap out the CFFROM and CFINPUT tags for normal FORM and
INPUT tags, using the CFFORM generated HTML as a reference for any
events like onChange, onClick or onSubmit that CFFORM created.
This will cut down on the amount of processing that CF does
just to render the javascript code.