Ad
  • Custom User Avatar
  • Custom User Avatar
  • Custom User Avatar

    The translation needs some work...

    According to the description the solutions should pass the following tests:

    Assert.assertEquals("Didn't accept valid email", EmailValidator.validate("asdf@asdf.asdf.s.123.1_a._._._._"), true);
    Assert.assertEquals("Didn't accept valid email", EmailValidator.validate("asdf@asdf.asdf.asdf.asdf.123"), true);
    Assert.assertEquals("Didn't accept valid email", EmailValidator.validate("asdf@asdf.asdf_._asdf"), true);
    Assert.assertEquals("Didn't accept valid email", EmailValidator.validate("asdf@asdf.asdf"), true);
    Assert.assertEquals("Accepted invalid email", EmailValidator.validate("test@test.test.."), false);
    Assert.assertEquals("Accepted invalid email", EmailValidator.validate("1@test.test"), false);
    Assert.assertEquals("Accepted invalid email", EmailValidator.validate("1_adf@asdf.asdf"), false);
    Assert.assertEquals("Accepted invalid email", EmailValidator.validate("asdf.asdf@asdf.asdf"), false);
    

    Most solutions fail those test... Would be great if you could update the tests. :)