Disable spaces in site name on multisite reg form.

I have a signup form here:

Where you enter the site my form is allowing spaces which then screws up the url to the site. I need to remove spaces if entered or disallow with a error message.
So now if they enter a site name as "my site" it stores in the blog table as "my site" with the space instead of "mysite" which would work.

I am also you using this for my registration form, guess its outdated?

Works fine as long as you don't enter a space. Would be nice if it automatically replaced the space with a hyphen.

Any suggestions?