Why removing of spaces fails with multiple select field?
<p>I have universal code to remove spaces at the beginning and at the end of field value:</p>

<pre><code>var fieldValue = $('#'+fieldName).val().replace(/\s+$/g, '');
</code></pre>

<p>But in case <code>&lt;select multiple="multiple"</code> field is passed, it fails.</p>

<p>Can I have universal code to bypass such fields?</p>
