I asked the question on stack overflow:
http://stackoverflow.com/questions/1827483/jquery-validate-plugin-how-to-trim-values-before-form-validation

On Dec 1, 1:50 pm, tom <thomasfothe...@googlemail.com> wrote:
> I'm using the jquery.validation plugin by Jörn Zaefferer and I was
> wondering whether there's a easy way to trim form elements before they
> are validated.
>
> For example, if I'm validating a email address: "t...@test.com   "
> using the "email : true" rule, it'll display an error because the
> trailing whitespace is invalidating the email format. I was hoping I
> could chain "jQuery.trim(value)" before the validation so the
> whitespace is removed and the validation error never occurs?
>
> Disclaimer: The jquery.validation plugin documentation page currently
> isn't working (http://docs.jquery.com/Plugins/Validation) so I can't
> RTFM.

Reply via email to