These are chat archives for MontCode/GeneralChat

28th
Aug 2016
Eric Phy
@SimplyPhy
Aug 28 2016 04:15
my password validation is a thing of beauty :D
it’s official
Eric Phy
@SimplyPhy
Aug 28 2016 18:47
anybody see any glaring errors in this?
Note: the RegEx pattern itself is definitely fine, but I think I instantiated it improperly. Idk though.
reqEmail  = new RegExp('^\S+@\S+[\.][0-9a-z]+$’);

if (reqEmail.test($email.val())) {
      $email.css('background', 'hsl(180, 96%, 90%)');
      state_email = true;
}
I should point out: the problem is that if (reqEmail.test($email.val())) never passes, but as I said, the RegEx pattern is, by itself, 100% accurate
oh and don’t worry about the lack of var, it’s in the code
Eric Phy
@SimplyPhy
Aug 28 2016 19:03
figured it out: in the new RegEx constructor, you have to escape your escape values…meaning I had to do the following:
reqEmail = new RegExp(‘^\\S+@\\S+[\\.][0-9a-z]+$’);
Eric Phy
@SimplyPhy
Aug 28 2016 20:03
sometimes programming is depressing
like when you’re trying to do something simple, and it’s stupidly difficult, and you’re reminded of how much of your future is going to be spent recurrently experiencing that feeling
Eric Phy
@SimplyPhy
Aug 28 2016 21:25
This message was deleted
This message was deleted
This message was deleted
Eric Phy
@SimplyPhy
Aug 28 2016 21:30
This message was deleted
nevermind; typo xD