Constrain source name length with maxlength.

The ```pattern''' parameter that was used previously
is not compatible with all browsers.