Please, don't do that.  The modified regex you provided is way over
simplified.  I'll try to produce the regex you want, it should be as
easy as making the domain label required in the host name.


On Jan 30, 7:43 pm, Rus Miller <[EMAIL PROTECTED]> wrote:
> I agree, [EMAIL PROTECTED] isn't likely to be used anytime soon in a real-
> world situation.
>
> I've hacked the plugin on line 865 from:
>
> return this.optional(element) || /^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?
> \^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\
> $%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])
> +)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b
> \x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-
> \uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF
> \uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|
> \x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-
> \uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|
> \d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|
> [\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)*(([a-z]|[\u00A0-\uD7FF
> \uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-
> \uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-
> \uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/
> i.test(value);
>
> to:
>
> return this.optional(element) || /^[_a-z0-9-]+(\.[_a-z0-9-]+)[EMAIL PROTECTED]
> z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$/i.test(value);
>
> This seems to work for me.  Please test and let me know.
>
> On Jan 30, 4:55 pm, Seth - TA <[EMAIL PROTECTED]> wrote:
>
> > Is there a way to change that? Or, what part of the email regex could
> > I modify? I would think that most people would agree with me that
> > @localhost wouldn't really be a valid email for production use. If I
> > am wrong, then tell me, however, could you point me in the right
> > direction to not allow a valid email without a .com, .net, etc, etc.
> > Thanks.
>
> > Regards,
>
> > Seth
>
> > On Jan 28, 3:10 pm, Jörn Zaefferer <[EMAIL PROTECTED]> wrote:
>
> > > Yuval schrieb:> Thisemail
> > > > [EMAIL PROTECTED]
> > > > validates perfectly on v1.2. No .com nothing...
> > > > Is it broken or is it done on purpose?
> > > > I tried it on my site AND on the remember-the-milk demo...
>
> > > Nope. Its perfectly valid, just as something like [EMAIL PROTECTED] is 
> > > valid.
>
> > > Jörn

Reply via email to