Here's the corresponding jquery validation code. As you can see, it seems that the length check applies to the number of options selected, and not to the length of the parameter. They seem to apply only to multibyte lists. Some kind of strange, to be honest.
maxlength: function(value, element, param) {
return this.optional(element) || this.getLength($.trim(value), element) <= param;
}
getLength: function(value, element) {
switch( element.nodeName.toLowerCase() ) {
case 'select':
return $("option:selected", element).length;
case 'input':
if( this.checkable( element) )
return this.findByName(element.name).filter(':checked').length;
}
return value.length;
}
, getLength, value.length .
$.validator.prototype.getLength = function (value, element) {
return value.length;
}