Registry Mirror
Skip to content

Does/should validators check for a static list of currently valid Top Level Domains (TLD)?  #198

Closed

Description

@jlegido

First of all many thanks to all the people involved in this project, I really appreciate his/her time.

I was wondering if library is expected to simply validate a domain from a RFC standpoint or is expected to check a list of TLDs for instance.

Steps to reproduce

  1. Create a script
cat <<EOF >> test.py
#!/usr/bin/python3
from validators import domain
print(domain("sanpellegrino-corporate.itOLDWEBSITE"))
EOF
  1. Execute it
python3 test.py

Expected behaviour

False

Found behaviour

True

Errors

None

Additional information

Operating system:

Debian GNU/Linux bookworm/sid \n \l

Library version:

validators         0.18.2

Python version:

Python 3.9.9

Activity

  1. added
    enhancement
    duplicate
    on Mar 2, 2023
  2. added
    outdated
    on Mar 14, 2023
  3. maaaaz commented on Apr 14, 2023

    @maaaaz

    I think it could be a good idea to use the daily updated list of TLD:
    https://www.icann.org/resources/pages/tlds-2012-02-25-en
    https://data.iana.org/TLD/tlds-alpha-by-domain.txt

  4. aviiciii commented on Jul 22, 2023

    @aviiciii
    Contributor

    is this implemented? if not I would ilke to work on this.

  5. nandgator commented on Jul 22, 2023

    @nandgator
    Collaborator

    Sure, go ahead.

  6. added
    outdated
    and removed
    outdated
    on Jul 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

duplicateenhancementoutdated

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions