FakerPHP / Faker

Faker is a PHP library that generates fake data for you
https://fakerphp.github.io
Other
3.49k stars 331 forks source link

[QUESTION] Avoid "unwanted" results #680

Closed SiestaCat closed 10 months ago

SiestaCat commented 11 months ago

Hello

echo $faker->email();

Just output porn@yahoo.com

How to avoid generating this "unwanted" result? Like porn or another similar keywords.

Thanks

DvDty commented 11 months ago

Try safeEmail

https://fakerphp.github.io/formatters/internet/

pimjansen commented 11 months ago

Try safeEmail

https://fakerphp.github.io/formatters/internet/

SafeEmail wont resolve this since it will only remove all non string chars.

Which locale was this? As far as i can see in general only names are used to generate email addresses so

DvDty commented 11 months ago

Makes sense. You can also use the company name or first/last name in addition to domain generation to build yourself an email.

Also I can't find the string as a standalone anywhere in the repo 🤔