Tld

February 3, 2026 ยท View on GitHub

  • Tld()

Validates whether the input is a top-level domain.

v::tld()->assert('com');
// Validation passes successfully

v::tld()->assert('ly');
// Validation passes successfully

v::tld()->assert('org');
// Validation passes successfully

v::tld()->assert('COM');
// Validation passes successfully

Templates

Tld::TEMPLATE_STANDARD

ModeTemplate
default{{subject}} must be a top-level domain name
inverted{{subject}} must not be a top-level domain name

Template placeholders

PlaceholderDescription
subjectThe validated input or the custom validator name (if specified).

Categorization

  • Internet

Changelog

VersionDescription
3.0.0Templates changed
0.3.9Created

See Also