SPRY validation
One of the websites i’ve been working on over the last couple weeks requires the user to enter in a valid email address. To save us time my colleague threw in the spry library - SpryValidationTextField - to take care of the validation.
I had an email from our clients saying that they have a user that is having problems entering their email into the form. It turns out the spry library is rejecting an email with an apostrophe in it. so an email address like john.o’shea@myaddress.com will be reported as invalid.
I jumped onto Adobe Labs and had a peak around the spry forum. Looks like a few things that are in the email RFC have been left out of the spry email validation. One of the Adobe crew had responded to one of the posts saying he would raise the bug so validation would support the chars mentioned in the RFC.
I added a post to the thread asking if the bug was fixed in 1.6.1? Or is it coming in the next version? If it was meant to be fixed in 1.6.1 I think there could still be an issue.
For the meantime I updated the regular expression in the SpryValidationTextField.js file to allow an apostrophe. Careful, you have to do a search for the regex because all whitespace has been stripped out to reduce file size.
About this entry
You’re currently reading “SPRY validation,” an entry on ConstantConfusion
- Published:
- 11.05.08 / 10am
- Category:
- Development

No comments
Jump to comment form | comments rss [?] | trackback uri [?]