question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

pt_BR email not returning valid email addresses

See original GitHub issue

When creating a fake Factory with the pt_BR it is not returning valid email addresses. Example:

melocauã@bol.com.br
joão-gabrielferreira@ig.com.br
lavíniarodrigues@sales.org
vitória78@example.br

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
dvdmglcommented, Sep 12, 2017

@clarmso @fcurella

Found this bug in my tests, last place that i checked was Faker, a lot of time wasted… my 2 cents, escape all latin1 https://unicodelookup.com/#latin can work on a PR if @clarmso doesn’t have the time.

replacements = (
    ('À', 'a'), ('Á', 'a'), ('Â', 'a'), ('Ã', 'a'), ('Ä', 'a'), ('Å', 'a'),
    ('à', 'a'), ('á', 'a'), ('â', 'a'), ('ã', 'a'), ('ä', 'a'), ('å', 'a'),
    ('Ç', 'c'), ('ç', 'c'),
    ('Ñ', 'n'),
    ('È', 'e'), ('É', 'e'), ('Ê', 'e'), ('Ë', 'e'),
    ('è', 'e'), ('é', 'e'), ('ê', 'e'), ('ë', 'e'),
    ('Ì', 'i'), ('Í', 'i'), ('Î', 'i'), ('Ï', 'i'),
    ('ì', 'i'), ('í', 'i'), ('î', 'i'), ('ï', 'i'),
    ('Ò', 'o'), ('Ó', 'o'), ('Ô', 'o'), ('Õ', 'o'), ('Ö', 'o'), ('Ø', 'o'),
    ('Ù', 'u'), ('Ú', 'u'), ('Û', 'u'), ('Ü', 'u'),
    ('Ý', 'y'),
    ('Æ', 'ae'),
    ('Ð', 'eth'),
    ('Þ', 'thorn'),
    ('ß', 'sharp'),
    ('æ', 'ae'),
    ('ð', 'eth'),
)
0reactions
fcurellacommented, Aug 29, 2017

@clarmso thank you for volunteering! What’s needed is a ‘replacements’ attribute on the provider, such as in https://github.com/joke2k/faker/blob/master/faker/providers/internet/fr_FR/__init__.py#L12

Could you also add the same to pt_PT? I would assume they would need the same replacements

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Fix an Invalid Email Address: Best Guide 2022 [updated]
Follow the syntax from above and your email should be considered valid. So long as the domain exists and the servers are working...
Read more >
How to set SMTP and LDAP email settings - IBM
Complete the fields for SMTP Host, SMTP Port. Optionally, enter an email address in the Email from field to use for the sender...
Read more >
Know The Difference between a Valid & Invalid email address
Invalid email addresses belong to inactive recipients who don't engage with your content. The unengaged email addresses can be invalid for a few ......
Read more >
What are the rules for email address syntax?
A valid email address has four parts: Recipient name; @ symbol; Domain name; Top-level domain. Recipient name. The recipient name represents an email...
Read more >
validatorjs/validator.js: String validation - GitHub
If require_tld is set to false, e-mail addresses without having TLD in their domain will also be matched. If ignore_max_length is set to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found