Hey there,

Form.Validator has been in use in our company for a little while now and it works perfectly.

One problem I've encountered today is, that the validator properties in the class attribute don't work as expected.

Take a look here: http://mooshell.net/NQ8jM/

Now, to explain: we want to pass the error messages from the CMS to the form by using these validator properties. In the first example, everything is properly wrapped in single quotes and there are no spaces in the value (just "Required!").
In the second example there is one whitespace ("Fill in!").

So, I had a look at the source and it's splitting the class attribute value by a space, I thought it was a heavy regex at work.

Does anyone have an idea as to what I could do to allow whitespace in the validator properties? I also think that someone else should have encountered this already, spaces there should not be uncommon as the documentation also only says to properly escape everything. I can't escape a space (or can I?) and using a non-breaking space entity is also not an option as this text doesn't get wrapped when injected into a web page.


Cheers, Daniel

Reply via email to