I think of two approaches for solving this:
1) letting user type their full email address
2) letting user type the prefix of their email address. Ex. bob for
b...@gmail.com. User could select from a list of mail hosts like (gmail, hotmail, ...)
3) add a domain field to the form
-------------------------------------------------------------------------------------
1) extend the regular expression in the user model (~line 33) so that it fits the domains you allow
validates_format_of :email, :with => /^([^@\s]{1}+)@((?:[-a-z0-9]+\.)+[a-z]{2,})$/i, :on => :create, :message=>"Invalid email address or domain."
2) add a select field to your form which get values from (let's say) a constant in your User model where you store the allowed domain like ALLOWED_DOMAIN=[...]. You still can keep the validation for the whole email address (before validation concatenate the two fields).
3) let people type in their username and the domain into the next field (ex. e_domain)
than you can add a validation to that field like
That's not the complete code but a point from which you can start.
Chris