2017 © Pedro Peláez
 

library tld-checker

Top Level Domain (TLD) validation library for PHP

image

arubacao/tld-checker

Top Level Domain (TLD) validation library for PHP

  • Sunday, July 15, 2018
  • by arubacao
  • Repository
  • 1 Watchers
  • 32 Stars
  • 17,681 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 7 Forks
  • 0 Open issues
  • 38 Versions
  • 63 % Grown

The README.md

Top Level Domain (TLD) validation library for PHP

Latest Version on Packagist Build Status Codecov Quality Score Total Downloads, (*1)

This package allows validation of top level domains against the official The DNS Root Zone database from iana.org.
Use this to validate e.g. domains or email addresses., (*2)

The DNS Root Zone is the upper-most part of the DNS hierarchy, and involves delegating administrative responsibility of “top-level domains”, which are the last segment of a domain name, such as .com, .uk and .nz., (*3)

The database is stored locally and automatically updated for new database versions., (*4)

Installation

Install this package via composer:, (*5)

composer require arubacao/tld-checker

Laravel

If you would like to use arubacao/tld-checker with the Laravel Validator, you must also register the service provider:
(only required for Laravel <=5.4, for Laravel >=5.5 auto-discovery is enabled.), (*6)

// config/app.php

'providers' => [
    // Other Service Providers
    Arubacao\TldChecker\TldCheckerServiceProvider::class,
],

Notes:, (*7)

  • arubacao/tld-checker is functional and fully tested for PHP 7.0 - 8.0 & Laravel 5.0 - 8.x.

Usage

Check a TLD using Validator::isTld(): ``` php use Arubacao\TldChecker\Validator;, (*8)

Validator::isTld('com'); // true Validator::isTld('CN'); // true (case insensitiv) Validator::isTld('москва'); // true (works with internationalized domain name (IDN) | unicode) Validator::isTld('XN--CZRS0T'); // true (works with encoded IDN | 商店) Validator::isTld('.org'); // true (allows dot prefix) Validator::isTld('apricot'); // false, (*9)


Check if a string ends with a valid TLD using `Validator::endsWithTld()`: ``` php use Arubacao\TldChecker\Validator; Validator::endsWithTld('apple.com'); // true Validator::endsWithTld('NEWS.CN'); // true (case insensitiv) Validator::endsWithTld('müller.vermögensberater'); // true (works with internationalized domain name (IDN) | unicode) Validator::endsWithTld('xn--mller-kva.xn--vermgensberater-ctb');// true (works with encoded IDN | müller.vermögensberater) Validator::endsWithTld('farming.apricot'); // false

This package extends the Laravel Validator with these 2 methods:, (*10)

  • is_tld
  • ends_with_tld

Use them as follows:, (*11)

$request->validate([
    'tld' => 'required|is_tld',
    'email' => 'required|ends_with_tld'
]);

Testing

bash composer test, (*12)

Contributing

Please see CONTRIBUTING for details., (*13)

Credits

License

The MIT License (MIT). Please see License File for more information., (*14)

The Versions

15/07 2018

dev-master

9999999-dev https://github.com/arubacao/tld-checker

Top Level Domain (TLD) validation library for PHP

  Sources   Download

MIT

The Requires

  • ext-intl *
  • php ^7.0

 

The Development Requires

email domain validation tld tld-checker

15/07 2018

1.1.32

1.1.32.0 https://github.com/arubacao/tld-checker

Top Level Domain (TLD) validation library for PHP

  Sources   Download

MIT

The Requires

  • ext-intl *
  • php ^7.0

 

The Development Requires

email domain validation tld tld-checker

08/07 2018

1.1.31

1.1.31.0 https://github.com/arubacao/tld-checker

Top Level Domain (TLD) validation library for PHP

  Sources   Download

MIT

The Requires

  • ext-intl *
  • php ^7.0

 

The Development Requires

email domain validation tld tld-checker

01/07 2018

1.1.30

1.1.30.0 https://github.com/arubacao/tld-checker

Top Level Domain (TLD) validation library for PHP

  Sources   Download

MIT

The Requires

  • ext-intl *
  • php ^7.0

 

The Development Requires

email domain validation tld tld-checker

24/06 2018

1.1.29

1.1.29.0 https://github.com/arubacao/tld-checker

Top Level Domain (TLD) validation library for PHP

  Sources   Download

MIT

The Requires

  • ext-intl *
  • php ^7.0

 

The Development Requires

email domain validation tld tld-checker

17/06 2018

1.1.28

1.1.28.0 https://github.com/arubacao/tld-checker

Top Level Domain (TLD) validation library for PHP

  Sources   Download

MIT

The Requires

  • ext-intl *
  • php ^7.0

 

The Development Requires

email domain validation tld tld-checker

10/06 2018

1.1.27

1.1.27.0 https://github.com/arubacao/tld-checker

Top Level Domain (TLD) validation library for PHP

  Sources   Download

MIT

The Requires

  • ext-intl *
  • php ^7.0

 

The Development Requires

email domain validation tld tld-checker

03/06 2018

1.1.26

1.1.26.0 https://github.com/arubacao/tld-checker

Top Level Domain (TLD) validation library for PHP

  Sources   Download

MIT

The Requires

  • ext-intl *
  • php ^7.0

 

The Development Requires

email domain validation tld tld-checker

27/05 2018

1.1.25

1.1.25.0 https://github.com/arubacao/tld-checker

Top Level Domain (TLD) validation library for PHP

  Sources   Download

MIT

The Requires

  • ext-intl *
  • php ^7.0

 

The Development Requires

email domain validation tld tld-checker

20/05 2018

1.1.24

1.1.24.0 https://github.com/arubacao/tld-checker

Top Level Domain (TLD) validation library for PHP

  Sources   Download

MIT

The Requires

  • ext-intl *
  • php ^7.0

 

The Development Requires

email domain validation tld tld-checker

13/05 2018

1.1.23

1.1.23.0 https://github.com/arubacao/tld-checker

Top Level Domain (TLD) validation library for PHP

  Sources   Download

MIT

The Requires

  • ext-intl *
  • php ^7.0

 

The Development Requires

email domain validation tld tld-checker

06/05 2018

1.1.22

1.1.22.0 https://github.com/arubacao/tld-checker

Top Level Domain (TLD) validation library for PHP

  Sources   Download

MIT

The Requires

  • ext-intl *
  • php ^7.0

 

The Development Requires

email domain validation tld tld-checker

29/04 2018

1.1.21

1.1.21.0 https://github.com/arubacao/tld-checker

Top Level Domain (TLD) validation library for PHP

  Sources   Download

MIT

The Requires

  • ext-intl *
  • php ^7.0

 

The Development Requires

email domain validation tld tld-checker

22/04 2018

1.1.20

1.1.20.0 https://github.com/arubacao/tld-checker

Top Level Domain (TLD) validation library for PHP

  Sources   Download

MIT

The Requires

  • ext-intl *
  • php ^7.0

 

The Development Requires

email domain validation tld tld-checker

15/04 2018

1.1.19

1.1.19.0 https://github.com/arubacao/tld-checker

Top Level Domain (TLD) validation library for PHP

  Sources   Download

MIT

The Requires

  • ext-intl *
  • php ^7.0

 

The Development Requires

email domain validation tld tld-checker

08/04 2018

1.1.18

1.1.18.0 https://github.com/arubacao/tld-checker

Top Level Domain (TLD) validation library for PHP

  Sources   Download

MIT

The Requires

  • ext-intl *
  • php ^7.0

 

The Development Requires

email domain validation tld tld-checker

01/04 2018

1.1.17

1.1.17.0 https://github.com/arubacao/tld-checker

Top Level Domain (TLD) validation library for PHP

  Sources   Download

MIT

The Requires

  • ext-intl *
  • php ^7.0

 

The Development Requires

email domain validation tld tld-checker

25/03 2018

1.1.16

1.1.16.0 https://github.com/arubacao/tld-checker

Top Level Domain (TLD) validation library for PHP

  Sources   Download

MIT

The Requires

  • ext-intl *
  • php ^7.0

 

The Development Requires

email domain validation tld tld-checker

11/03 2018

1.1.15

1.1.15.0 https://github.com/arubacao/tld-checker

Top Level Domain (TLD) validation library for PHP

  Sources   Download

MIT

The Requires

  • ext-intl *
  • php ^7.0

 

The Development Requires

email domain validation tld tld-checker

04/03 2018

1.1.14

1.1.14.0 https://github.com/arubacao/tld-checker

Top Level Domain (TLD) validation library for PHP

  Sources   Download

MIT

The Requires

  • ext-intl *
  • php ^7.0

 

The Development Requires

email domain validation tld tld-checker

25/02 2018

1.1.13

1.1.13.0 https://github.com/arubacao/tld-checker

Top Level Domain (TLD) validation library for PHP

  Sources   Download

MIT

The Requires

  • ext-intl *
  • php ^7.0

 

The Development Requires

email domain validation tld tld-checker

18/02 2018

1.1.12

1.1.12.0 https://github.com/arubacao/tld-checker

Top Level Domain (TLD) validation library for PHP

  Sources   Download

MIT

The Requires

  • ext-intl *
  • php ^7.0

 

The Development Requires

email domain validation tld tld-checker

11/02 2018

1.1.11

1.1.11.0 https://github.com/arubacao/tld-checker

Top Level Domain (TLD) validation library for PHP

  Sources   Download

MIT

The Requires

  • ext-intl *
  • php ^7.0

 

The Development Requires

email domain validation tld tld-checker

04/02 2018

1.1.10

1.1.10.0 https://github.com/arubacao/tld-checker

Top Level Domain (TLD) validation library for PHP

  Sources   Download

MIT

The Requires

  • ext-intl *
  • php ^7.0

 

The Development Requires

email domain validation tld tld-checker

28/01 2018

1.1.9

1.1.9.0 https://github.com/arubacao/tld-checker

Top Level Domain (TLD) validation library for PHP

  Sources   Download

MIT

The Requires

  • ext-intl *
  • php ^7.0

 

The Development Requires

email domain validation tld tld-checker

21/01 2018

1.1.8

1.1.8.0 https://github.com/arubacao/tld-checker

Top Level Domain (TLD) validation library for PHP

  Sources   Download

MIT

The Requires

  • ext-intl *
  • php ^7.0

 

The Development Requires

email domain validation tld tld-checker

14/01 2018

1.1.7

1.1.7.0 https://github.com/arubacao/tld-checker

Top Level Domain (TLD) validation library for PHP

  Sources   Download

MIT

The Requires

  • ext-intl *
  • php ^7.0

 

The Development Requires

email domain validation tld tld-checker

07/01 2018

1.1.6

1.1.6.0 https://github.com/arubacao/tld-checker

Top Level Domain (TLD) validation library for PHP

  Sources   Download

MIT

The Requires

  • ext-intl *
  • php ^7.0

 

The Development Requires

email domain validation tld tld-checker

31/12 2017

1.1.5

1.1.5.0 https://github.com/arubacao/tld-checker

Top Level Domain (TLD) validation library for PHP

  Sources   Download

MIT

The Requires

  • ext-intl *
  • php ^7.0

 

The Development Requires

email domain validation tld tld-checker

24/12 2017

1.1.4

1.1.4.0 https://github.com/arubacao/tld-checker

Top Level Domain (TLD) validation library for PHP

  Sources   Download

MIT

The Requires

  • ext-intl *
  • php ^7.0

 

The Development Requires

email domain validation tld tld-checker

17/12 2017

1.1.3

1.1.3.0 https://github.com/arubacao/tld-checker

Top Level Domain (TLD) validation library for PHP

  Sources   Download

MIT

The Requires

  • ext-intl *
  • php ^7.0

 

The Development Requires

email domain validation tld tld-checker

10/12 2017

1.1.2

1.1.2.0 https://github.com/arubacao/tld-checker

Top Level Domain (TLD) validation library for PHP

  Sources   Download

MIT

The Requires

  • ext-intl *
  • php ^7.0

 

The Development Requires

email domain validation tld tld-checker

03/12 2017

1.1.1

1.1.1.0 https://github.com/arubacao/tld-checker

Top Level Domain (TLD) validation library for PHP

  Sources   Download

MIT

The Requires

  • ext-intl *
  • php ^7.0

 

The Development Requires

email domain validation tld tld-checker

01/12 2017

1.1.0

1.1.0.0 https://github.com/arubacao/tld-checker

Top Level Domain (TLD) validation library for PHP

  Sources   Download

MIT

The Requires

  • ext-intl *
  • php ^7.0

 

The Development Requires

email domain validation tld tld-checker

26/11 2017

1.0.3

1.0.3.0 https://github.com/arubacao/tld-checker

Top Level Domain (TLD) validation library for PHP

  Sources   Download

MIT

The Requires

  • ext-intl *
  • php ^7.0

 

The Development Requires

email domain validation tld tld-checker

26/11 2017

1.0.2

1.0.2.0 https://github.com/arubacao/tld-checker

Top Level Domain (TLD) validation library for PHP

  Sources   Download

MIT

The Requires

  • ext-intl *
  • php ^7.0

 

The Development Requires

email domain validation tld tld-checker

25/11 2017

1.0.1

1.0.1.0 https://github.com/arubacao/tld-checker

Top Level Domain (TLD) validation library for PHP

  Sources   Download

MIT

The Requires

  • ext-intl *
  • php ^7.0

 

The Development Requires

email domain validation tld tld-checker

25/11 2017

1.0

1.0.0.0 https://github.com/arubacao/tld-checker

Top Level Domain (TLD) validation library for PHP

  Sources   Download

MIT

The Requires

  • ext-intl *
  • php ^7.0

 

The Development Requires

email domain validation tld tld-checker