PDA

View Full Version : One letter domain not verifying


bjgarner241692
06-04-2009, 06:16 PM
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.

Ray Borduin
06-05-2009, 07:24 AM
Remove email validation and use Regular Expression validation on that form.

Use an expression from:
http://regexlib.com/Search.aspx?k=email

bjgarner241692
06-05-2009, 11:01 AM
Thanks, but the feature should work in VTK, as such, I submitted a support incident.

I do not understand Regular Expressions and do not have the time to fit in the learning curve.

That's why we buy extensions.

Ray Borduin
06-05-2009, 01:33 PM
You don't need to understand them. You just have to copy and paste the one that you want to use. Regular Expression validation is the catch all for when you are unhappy with the way a particular validation works.

I appreciate you don't understand them. But I think you should probably try to fix your problem since you can with very minimal effort instead of concentrating on how fair it is.

bjgarner241692
06-05-2009, 04:00 PM
I beg your pardon.

I bought a package of extensions with advertised functionality that in this case does not work.

The last time I messed with Regular Expressions I actually paid for a custom solution from WebAssist and when it was pointed out later that the expression does not work in all cases I was told that it was my problem. Check my support history.

I'm pretty sure that I am not the only client working on websites that may be visited by people with 1 letter domains. Perhaps WebAssist's time might be better spent fixing the problem with the extension rather than posting links to other web pages.

Ray Borduin
06-08-2009, 05:54 AM
I am sorry if you were offendend by my previous response. I'm just trying to point out that there is a very easy solution in the meantime since regular expression validation is available and there are many options for how to validate an email address.