Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Tld Checker

Tld Checker Laravel Package

arubacao/tld-checker

Validate top-level domains and email addresses in Laravel. Check whether a TLD exists, support generic and country-code domains, and reject emails with invalid or misspelled TLDs using a bundled, updatable TLD list—no external API calls required.

View on GitHub
Deep Wiki
Context7

Top Level Domain (TLD) validation library for PHP

Frequently asked questions about Tld Checker
How do I install arubacao/tld-checker in Laravel?
Install it with composer require arubacao/tld-checker. Register the package service provider if your Laravel version does not auto-discover it, then use the package's validation rule in a FormRequest or Validator call. Keep the integration behind your own rule if you want to swap or remove it later.
Does arubacao/tld-checker require an external API or network call?
No. The package validates against a bundled TLD list, so validation does not make an external API call at runtime. That keeps the check deterministic and fast, but it also means list freshness depends on how and when the bundled data is updated.
How do I validate an email address TLD in Laravel with this package?
Use Laravel's email rule together with the package's tld rule for a stricter email check. The tld rule answers whether the TLD is recognized, while the email rule handles address syntax. This combination rejects addresses with invalid or misspelled TLDs without replacing Laravel's normal email validation.
Which Laravel and PHP versions does arubacao/tld-checker support?
The 1.2.70 release adds PHP 8.0 support, but that does not by itself confirm the full Laravel and PHP support matrix. Check the package composer.json and README for the actual constraints before adopting it. The technical evaluation flags this as a verification item because PHP 8.0 is already end-of-life.
Can I update the TLD list without upgrading the package?
The package is described as having an updatable TLD list, but the provided context does not confirm whether refresh is done by a command, config setting, or package upgrade. Check the README and source for a published refresh command or config option. If no refresh path exists, plan to update the dependency when TLD data changes.
Does arubacao/tld-checker support country-code TLDs and new gTLDs?
Yes, the package is intended to support generic TLDs and country-code TLDs. Whether the newest delegated gTLDs are present depends on the bundled list version. Test a few recent TLDs in your target environment before relying on it for signup validation.
Does arubacao/tld-checker validate IDN or punycode TLDs?
IDN and punycode handling is not confirmed in the provided context and is a common correctness gap in TLD validators. Test both Unicode and punycode forms, such as an internationalized country-code TLD, before using the rule on user input. If your product accepts international domains, treat this as a must-verify item.
What happens when a TLD is not in the bundled list?
The failure mode for an unknown TLD is not stated in the provided context. It could return false, throw an exception, or pass through depending on the rule implementation. Verify this explicitly in tests, because a pass-through failure is much riskier for validation than a false return.
Is arubacao/tld-checker suitable for production use?
It can be suitable for production when the requirement is TLD existence, not mailbox deliverability. The main risks are a stale TLD dataset, single-maintainer concentration, and a runtime support floor that appears to trail current PHP versions. Wrap the package rule in your own validation rule and add tests for known-good, unknown, and IDN domains so you can replace it without touching every FormRequest.
What are alternatives to arubacao/tld-checker for Laravel email validation?
Alternatives depend on the requirement. Laravel's built-in email rule covers syntax but not TLD existence, DNS or MX checks test deliverability rather than TLD validity, and maintaining your own IANA-derived list is possible but adds refresh work. Choose arubacao/tld-checker when you specifically want a bundled, no-network TLD check in Laravel.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console