Conversation
I went a little overboard with the email validation. But, since I stole the code from a Perl module I released some time ago, I figured it was okay.
validator.js
Outdated
There was a problem hiding this comment.
Ha! Did you craft this yourself? I didn't see it in a quick scan of http://emailregex.com/
There was a problem hiding this comment.
@jaybobo I stole it straight out of a Perl module I published a bit ago: https://metacpan.org/pod/Value::Object::ValidationUtils
And that's based on research I did for a previous job. So, yeah, I crafted it myself, after reading through all of the RFCs and ruining my brain.
There was a problem hiding this comment.
Ha, its no biggy. I was just wondering thats all. :)
Sent from my iPhone
On Oct 7, 2015, at 8:48 PM, "G. Wade Johnson" notifications@github.com
wrote:
In validator.js
#16 (comment)
:
@@ -1,7 +1,58 @@
//insert your code here
+function valid_email_local_part(lpart)
+{
- if(lpart === undefined || lpart.length > 64 || lpart.length == 0)
return false;- // Localpart is one or more atext pieces separated by .s
- return lpart.match(/^[a-zA-Z0-9!#$%&'+-/=?^
{|}~]+(?:.[a-zA-Z0-9!#\$\%&'_+-/=?^_{|}~]+)*$/);
@jaybobo https://github.com/jaybobo I stole it straight out of a Perl
module I published a bit ago:
https://metacpan.org/pod/Value::Object::ValidationUtils
And that's based on research I did for a previous job. So, yeah, I crafted
it myself, after reading through all of the RFCs and ruining my brain.
—
Reply to this email directly or view it on GitHub
https://github.com/paircolumbus/FormValidator/pull/16/files#r41466203.
I had an error in the way I used grep that caused validation problems. I fixed that. Then, I added support for stopping submit on errors.
|
This is the last version doing the validation in straight jQuery and JavaScript. |
I went a little overboard with the email validation. But, since I stole
the code from a Perl module I released some time ago, I figured it was
okay.
@chivygab @jaybobo @mikegee Please review.
I am currently stymied getting coffee-script installed. If I can get that done, I'll rewrite in that.