Thank you very much!!!
On Apr 22, 1:27 pm, Jörn Zaefferer <[EMAIL PROTECTED]> wrote: > sebastian schrieb:> Hi, i'm developing a costum validation method for a > password field, > > the password must not contain spaces. I thought my method worked fine > > until during a test i put a space at the end of the password, my > > method returned that the password was correct, and i noticed that the > > problem was that the value of the field is trimmed before it is sent > > to the validation method. And I thought it might be a good idea not to > > trim the values before they are sent to the validation methods, what > > do you think? > > Instead of using the trimmed value in your method, use the second > argument, which points to the element itself, and get the value from > there, via element.value > > Jörn