Refactor Ean validator