One letter domain not verifying
Recently a customer pointed out to me that one of their clients @q.com could not make an order on their site because it said it was an invalid email address.
The restriction was set with Validation Toolkit, which creates a Regular Expression that is obviously pattern matching and is set to recognize only 2 letter or longer domains. That would be fine if nobody had a one letter domain. ... but they do.
The response I got from Tech Support was
QUOTE:
If you want to remove the Email restriction, you can remove each client validation by clicking on the Behaviors panel (Windows->Behaviors), and then select the form. You can then remove the email restriction.
As far as changing the code to allow for a single letter domain, it is not an easy fix, and it would require changing the regular expression.
END QUOTE
Not terribly helpful. Actually, I did know how to remove the behaviour, having put it there myself by clicking the little + sign, I guessed what the little minus sign was for.
It has now been more than 48 hours since I requested that they send me the revised Regular Expression and I have received no response at all.
No revised expression, no indication as to whether the bug will be fixed in the extension. Nothing.
If anyone knows how to read and edit regular expressions I would be ever so grateful for some help.
I'm guessing that the offending bit of code is in here:
for (x=0; x < domArr.length; x++) {
if (domArr[x].search(acceptedPat) == -1 || domArr[x].length == 0 || (domArr[x].length < 2 && x >= domArr.length-2)) {
isValid = false;
}
}
if (domArr[domArr.length-1].length !=2 && domArr[domArr.length-1].search(knownDomsPat) == -1) {
isValid = false;
}
if (domArr.length < 2) {
isValid = false;
... but I really don't have a clue.