Giter VIP home page Giter VIP logo

email-address-validator's People

Contributors

aziraphale avatar reetp avatar splitbrain avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

email-address-validator's Issues

Tests not executable

There are multiple problems with the tests:

  • phpunit is not in the dev requirements
  • phpunit is required at the top (shouldn't be needed when phar or autoloading is used)
  • EmailAddressValidator is required at the top (should be autoloaded via composer)
  • Tests call EmailAddressValidator::check_email_address() but should be calling EmailAddressValidator::checkEmailAddress()

Increase or eliminate local email length check

Even though the email spec say the local part should be at max 64 characters, the comment says servers are encouraged to accept more than 64. This library is used by Dokuwiki to validate emails. Todoist uses emails where the local part is longer than 64 characters. Given that there are "valid" emails longer than 64 characters, this should be removed, increased, or at least adjustable by a parameter. It is better to let an "invalid" email through than to block a valid email. An invalid email will fail regardless upon being sent (as if it is valid format but just hasn't been created). A "valid" email getting rejected prevents it from being used at all with no possibility of a workaround.

Here is the line in question:

if (!self::checkTextLength($localPortion, 1, 64)) {

static approach makes it hard to extend functionality

We're currently using a patched version of the old Google Code version which has an option to allow local addresses (see 02700828f76adcfc63a9dafe75ffa941cdb9831b).

It would be possible to implement this in your version by passing a second parameter to checkEmailAddress() and checkDomainPotion() but I wonder if making this static was such a good idea...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.