jQuery Validator, programmatically show errors
<p>I can do something like this:</p>

<pre><code>validator.showErrors({ "nameOfField" : "ErrorMessage" });
</code></pre>

<p>And that works fine, however if I try and do something like this:</p>

<pre><code>var propertyName = "nameOfField";
var errorMessage = "ErrorMessage";
validator.showErrors({ propertyName : errorMessage });
</code></pre>

<p>It throws an 'element is undefined' error.</p>
