Restrict select field to two options

I would like to restrict the Select fields to two selections. So a visitor could only select two options max out of available N options.