[pull] master from python-validators:master by pull[bot] · Pull Request #30 · sysfce2/python-validators · GitHub
Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
ca1b41f
chore: update (dev) dependencies; bump version
nandgator Sep 3, 2024
fa9b550
Update README.md
mattseymour Sep 9, 2024
dd11808
Merge pull request #400 from mattseymour/patch-1
nandgator Sep 13, 2024
0a791b6
fix(domain): accept .onion as a valid TLD
davidt99 Sep 15, 2024
597a030
Merge pull request #402 from davidt99/master
nandgator Sep 16, 2024
1231f6a
fix(url): add hashtag to allowed fragment characters
davidt99 Oct 6, 2024
c9585e9
Merge pull request #405 from davidt99/master
nandgator Oct 7, 2024
7114870
chore(deps): bump jinja2 from 3.1.4 to 3.1.6 in /package
dependabot[bot] Mar 6, 2025
da45d42
Merge pull request #414 from python-validators/dependabot/pip/package…
nandgator Mar 7, 2025
640763f
Add script validators inn.py
TheDrunkenBear Oct 26, 2024
56f0210
Validators inn company
TheDrunkenBear Oct 26, 2024
d1ff35b
weight coefficients from company
TheDrunkenBear Oct 27, 2024
b4f1cb9
validators inn person
TheDrunkenBear Oct 27, 2024
5ffcdb3
update __init__.py
TheDrunkenBear Oct 27, 2024
011e861
update .gitignore
TheDrunkenBear Oct 27, 2024
014a6bb
drop comment
TheDrunkenBear Oct 27, 2024
1462c7b
Update weights && add description function
TheDrunkenBear Oct 27, 2024
71c9bbb
Add link validator algorithm
TheDrunkenBear Oct 27, 2024
874f0a9
Add decorator validator
TheDrunkenBear Oct 27, 2024
2398003
Moved all files to the i18n directory.
TheDrunkenBear Oct 29, 2024
6bf90e2
add tests
TheDrunkenBear Oct 29, 2024
e50832a
rename function `inn` -> `ru_inn`
TheDrunkenBear Nov 3, 2024
7722459
add function description and fix validators imports
TheDrunkenBear Mar 27, 2025
ad2e2c5
chore: linting & formatting
nandgator Mar 28, 2025
894a069
Merge pull request #408 from tabbols95/validators_inn
nandgator Mar 28, 2025
9dac863
feat: allow custom URL scheme validation (#409)
e3krisztian Mar 28, 2025
25fcef0
Fix email regex issue 140 (#411)
cwisdo Mar 28, 2025
d6241fc
fix(uri): remove "mailto:" prefix manually (#418)
max-moser Mar 29, 2025
f7742c5
Refactor API: remove print from ru_inn, update description, and expos…
TheDrunkenBear Apr 3, 2025
b2510d1
feat: adds `doctest` (#417)
d-chris Apr 26, 2025
7c97eca
Fix: Allow Special DOI Cases Used in Public Administration Tests (#415)
MaurizioPilia Apr 26, 2025
bafe62e
feat: add Mir card validation support (#420)
TheDrunkenBear Apr 26, 2025
8691cea
chore: formatting; sync dependencies (#422)
nandgator May 1, 2025
ca2db46
chore(deps): bump certifi from 2024.6.2 to 2024.7.4 in /package
dependabot[bot] May 1, 2025
6d8a1ab
chore: prepare for new release
nandgator May 1, 2025
de4948f
Merge pull request #424 from yozachar/workshop
nandgator May 1, 2025
0b1799c
chore: updates changelog
nandgator May 1, 2025
75788ed
Merge pull request #425 from yozachar/workshop
nandgator May 1, 2025
5a80c7e
chore: update project classifiers
nandgator May 1, 2025
74a8287
Merge pull request #426 from yozachar/workshop
nandgator May 1, 2025
560428d
chore(deps): bump jinja2 from 3.1.4 to 3.1.6 in /package
dependabot[bot] May 1, 2025
a93bca3
Merge pull request #428 from python-validators/dependabot/pip/package…
nandgator May 1, 2025
e6d50ba
Merge pull request #423 from python-validators/dependabot/pip/package…
nandgator May 1, 2025
8ff15cb
chore(deps): bump requests from 2.32.3 to 2.32.4 in /package
dependabot[bot] Jun 10, 2025
5440442
Merge pull request #430 from python-validators/dependabot/pip/package…
nandgator Jun 12, 2025
402b351
fix: reject MAC addresses with mixed separators
iCasture Jul 18, 2025
9bc7e82
Merge pull request #432 from iCasture/master
nandgator Oct 3, 2025
843a2ab
chore: update codebase to reflect new username
nandgator Mar 14, 2026
73bdebe
fix: update CI workflows to use latest actions and Python versions
nandgator Mar 14, 2026
70de324
Merge pull request #447 from python-validators/workshop.jovial
nandgator Mar 14, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 10 additions & 8 deletions .github/workflows/pycqa.yaml
31 changes: 6 additions & 25 deletions .github/workflows/sast.yaml
Original file line number Diff line number Diff line change
@@ -1,40 +1,21 @@
# Static Application Security Testing
name: sast

on:
workflow_dispatch:
push:
branches: ["master"]
pull_request:
branches: ["master"]
schedule:
- cron: "00 00 * * 0"

jobs:
sast:
permissions:
contents: read # for actions/checkout to fetch code
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
security-events: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Bandit
uses: mdegis/bandit-action@85fcc340c3b0bf5d86029abb49b9aac916d807b2
uses: PyCQA/bandit-action@v1
with:
# exit with 0, even with results found
# exit_zero: true # optional, default is DEFAULT
# Github token of the repository (automatically created by Github)
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information.
# File or directory to run bandit on
path: ./src/validators # optional, default is .
# Report only issues of a given severity level or higher. Can be LOW, MEDIUM or HIGH. Default is UNDEFINED (everything)
# level: # optional, default is UNDEFINED
# Report only issues of a given confidence level or higher. Can be LOW, MEDIUM or HIGH. Default is UNDEFINED (everything)
# confidence: # optional, default is UNDEFINED
# comma-separated list of paths (glob patterns supported) to exclude from scan (note that these are in addition to the excluded paths provided in the config file) (default: .svn,CVS,.bzr,.hg,.git,__pycache__,.tox,.eggs,*.egg)
excluded_paths: .github,.pytest_cache,.venv,.vscode,site,tests # optional, default is DEFAULT
# comma-separated list of test IDs to skip
# skips: # optional, default is DEFAULT
# path to a .bandit file that supplies command line arguments
# ini_path: # optional, default is DEFAULT
# https://github.com/marketplace/actions/bandit-scan is ISC licensed, by abirismyname
# https://pypi.org/project/bandit/ is Apache v2.0 licensed, by PyCQA
targets: src/validators
exclude: .github,.pytest_cache,.venv,.vscode,site,tests
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ cython_debug/
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
.idea/

# VSCode
.vscode/
Expand All @@ -172,6 +172,10 @@ cython_debug/
# rtx/mise
.rtx.toml
.mise.toml
mise.toml

# ruff
.ruff_cache

# taplo
.taplo.toml
444 changes: 245 additions & 199 deletions CHANGES.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ $ . ./.venv/bin/activate
# generate documentation
$ python package/export TYPE # where TYPE is any of `doc`, `man` or `web`.

# doc - generates docs found here: https://yozachar.github.io/pyvalidators
# doc - generates docs found here: https://nandgator.github.io/pyvalidators
# man - generates sphinx based manpages
# web - generates sphinx based web docs
```
Expand Down Expand Up @@ -83,7 +83,7 @@ $ python -m http.server -d docs/_build/web
### Versioned documentation

1. To preview versioned docs, run `mike serve` (`mike` is a dev dependency).
2. Then (look at <https://yozachar.github.io/pyvalidators/stable/>)
2. Then (look at <https://nandgator.github.io/pyvalidators/stable/>)
- to publish stable docs run `mike deploy -p -u VERSION stable` after checking out to a stable tag name like `0.28.3` (note: document `VERSION = 0.29 if tag_name == 0.29.1`).
- to publish bleeding-edge docs run `mike deploy -p -u dev master` after checking out to the `master` branch.
3. This will deploy docs to the `gh-pages` branch (see: <https://github.com/python-validators/validators/tree/gh-pages/>)
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2013 - 2024 Konsta Vesterinen
Copyright (c) 2013 - 2025 Konsta Vesterinen

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
Expand Down
18 changes: 12 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,25 @@ require defining a schema or form. I wanted to create a simple validation
library where validating a simple value does not require defining a form or a
schema.

```shell
pip install validators
```

Then,

```python
>>> import validators
>>>
>>>
>>> validators.email('someone@example.com')
True
```

## Resources

<!-- Backup documentation URL : https://yozachar.github.io/pyvalidators/ -->
<!-- Backup documentation URL : https://nandgator.github.io/pyvalidators/ -->
<!-- Original documentation URL : https://python-validators.github.io/validators/ -->

- [Documentation](https://yozachar.github.io/pyvalidators)
- [Documentation](https://nandgator.github.io/pyvalidators)
- [Bugtracker](https://github.com/python-validators/validators/issues)
- [Security](https://github.com/python-validators/validators/blob/master/SECURITY.md)
- [Code](https://github.com/python-validators/validators/)
Expand All @@ -30,15 +36,15 @@ True

---

> **_Python 3.8 [reaches EOL in](https://endoflife.date/python) October 2024._**
> **_Python 3.9 [reaches EOL in](https://endoflife.date/python) October 2025._**

<!-- Links -->
[sast-badge]: https://github.com/python-validators/validators/actions/workflows/sast.yaml/badge.svg
[sast-link]: https://github.com/python-validators/validators/actions/workflows/sast.yaml
[pycqa-badge]: https://github.com/python-validators/validators/actions/workflows/pycqa.yaml/badge.svg
[pycqa-link]: https://github.com/python-validators/validators/actions/workflows/pycqa.yaml
[docs-badge]: https://github.com/yozachar/pyvalidators/actions/workflows/pages/pages-build-deployment/badge.svg
[docs-link]: https://github.com/yozachar/pyvalidators/actions/workflows/pages/pages-build-deployment
[docs-badge]: https://github.com/nandgator/pyvalidators/actions/workflows/pages/pages-build-deployment/badge.svg
[docs-link]: https://github.com/nandgator/pyvalidators/actions/workflows/pages/pages-build-deployment
[vs-badge]: https://img.shields.io/pypi/v/validators?logo=pypi&logoColor=white&label=version&color=blue
[vs-link]: https://pypi.python.org/pypi/validators/
[dw-badge]: https://img.shields.io/pypi/dm/validators?logo=pypi&logoColor=white&color=blue
Expand Down
2 changes: 1 addition & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

| Version | Supported |
| ---------- | ------------------ |
| `>=0.33.0` | :white_check_mark: |
| `>=0.35.0` | :white_check_mark: |

## Reporting a Vulnerability

Expand Down
1 change: 1 addition & 0 deletions docs/api/card.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@
::: validators.card.discover
::: validators.card.jcb
::: validators.card.mastercard
::: validators.card.mir
::: validators.card.unionpay
::: validators.card.visa
1 change: 1 addition & 0 deletions docs/api/card.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ card
.. autofunction:: discover
.. autofunction:: jcb
.. autofunction:: mastercard
.. autofunction:: mir
.. autofunction:: unionpay
.. autofunction:: visa
1 change: 1 addition & 0 deletions docs/api/i18n.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@
::: validators.i18n.fr_ssn
::: validators.i18n.ind_aadhar
::: validators.i18n.ind_pan
::: validators.i18n.ru_inn
1 change: 1 addition & 0 deletions docs/api/i18n.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ i18n
.. autofunction:: fr_ssn
.. autofunction:: ind_aadhar
.. autofunction:: ind_pan
.. autofunction:: ru_inn
18 changes: 12 additions & 6 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,25 @@ require defining a schema or form. I wanted to create a simple validation
library where validating a simple value does not require defining a form or a
schema.

```shell
pip install validators
```

Then,

```python
>>> import validators
>>>
>>>
>>> validators.email('someone@example.com')
True
```

## Resources

<!-- Backup documentation URL : https://yozachar.github.io/pyvalidators/ -->
<!-- Backup documentation URL : https://nandgator.github.io/pyvalidators/ -->
<!-- Original documentation URL : https://python-validators.github.io/validators/ -->

- [Documentation](https://yozachar.github.io/pyvalidators)
- [Documentation](https://nandgator.github.io/pyvalidators)
- [Bugtracker](https://github.com/python-validators/validators/issues)
- [Security](https://github.com/python-validators/validators/blob/master/SECURITY.md)
- [Code](https://github.com/python-validators/validators/)
Expand All @@ -30,15 +36,15 @@ True

---

> **_Python 3.8 [reaches EOL in](https://endoflife.date/python) October 2024._**
> **_Python 3.9 [reaches EOL in](https://endoflife.date/python) October 2025._**

<!-- Links -->
[sast-badge]: https://github.com/python-validators/validators/actions/workflows/sast.yaml/badge.svg
[sast-link]: https://github.com/python-validators/validators/actions/workflows/sast.yaml
[pycqa-badge]: https://github.com/python-validators/validators/actions/workflows/pycqa.yaml/badge.svg
[pycqa-link]: https://github.com/python-validators/validators/actions/workflows/pycqa.yaml
[docs-badge]: https://github.com/yozachar/pyvalidators/actions/workflows/pages/pages-build-deployment/badge.svg
[docs-link]: https://github.com/yozachar/pyvalidators/actions/workflows/pages/pages-build-deployment
[docs-badge]: https://github.com/nandgator/pyvalidators/actions/workflows/pages/pages-build-deployment/badge.svg
[docs-link]: https://github.com/nandgator/pyvalidators/actions/workflows/pages/pages-build-deployment
[vs-badge]: https://img.shields.io/pypi/v/validators?logo=pypi&logoColor=white&label=version&color=blue
[vs-link]: https://pypi.python.org/pypi/validators/
[dw-badge]: https://img.shields.io/pypi/dm/validators?logo=pypi&logoColor=white&color=blue
Expand Down
20 changes: 13 additions & 7 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,16 @@ seems to require defining a schema or form. I wanted to create a simple
validation library where validating a simple value does not require
defining a form or a schema.

.. code:: shell

pip install validators

Then,

.. code:: python

>>> import validators
>>>
>>>
>>> validators.email('someone@example.com')
True

Expand All @@ -24,13 +30,13 @@ Resources

.. raw:: html

<!-- Backup documentation URL : https://yozachar.github.io/pyvalidators/ -->
<!-- Backup documentation URL : https://nandgator.github.io/pyvalidators/ -->

.. raw:: html

<!-- Original documentation URL : https://python-validators.github.io/validators/ -->

- `Documentation <https://yozachar.github.io/pyvalidators>`__
- `Documentation <https://nandgator.github.io/pyvalidators>`__
- `Bugtracker <https://github.com/python-validators/validators/issues>`__
- `Security <https://github.com/python-validators/validators/blob/master/SECURITY.md>`__
- `Code <https://github.com/python-validators/validators/>`__
Expand All @@ -41,8 +47,8 @@ Resources

--------------

**Python 3.8** `reaches EOL in <https://endoflife.date/python>`__
**October 2024.**
**Python 3.9** `reaches EOL in <https://endoflife.date/python>`__
**October 2025.**

.. raw:: html

Expand All @@ -57,8 +63,8 @@ Resources
:target: https://github.com/python-validators/validators/actions/workflows/pycqa.yaml
.. |SAST| image:: https://github.com/python-validators/validators/actions/workflows/sast.yaml/badge.svg
:target: https://github.com/python-validators/validators/actions/workflows/sast.yaml
.. |Docs| image:: https://github.com/yozachar/pyvalidators/actions/workflows/pages/pages-build-deployment/badge.svg
:target: https://github.com/yozachar/pyvalidators/actions/workflows/pages/pages-build-deployment
.. |Docs| image:: https://github.com/nandgator/pyvalidators/actions/workflows/pages/pages-build-deployment/badge.svg
:target: https://github.com/nandgator/pyvalidators/actions/workflows/pages/pages-build-deployment
.. |Version| image:: https://img.shields.io/pypi/v/validators?logo=pypi&logoColor=white&label=version&color=blue
:target: https://pypi.python.org/pypi/validators/
.. |Downloads| image:: https://img.shields.io/pypi/dm/validators?logo=pypi&logoColor=white&color=blue
Expand Down
4 changes: 2 additions & 2 deletions mkdocs.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
site_name: "validators"
site_description: "Automatic documentation from sources, for MkDocs."
site_url: "https://yozachar.github.io/pyvalidators/"
site_url: "https://nandgator.github.io/pyvalidators/"
repo_url: "https://github.com/python-validators/validators/"
edit_uri: "edit/master/docs/"
repo_name: "validators/validators"
Expand Down Expand Up @@ -63,7 +63,7 @@ extra:
provider: mike
default: stable

copyright: Copyright &copy; 2013 - 2024 Konsta Vesterinen
copyright: Copyright &copy; 2013 - 2025 Konsta Vesterinen

nav:
- Home: index.md
Expand Down
3 changes: 2 additions & 1 deletion package/export/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ def _gen_rst_docs(source: Path, refs_path: Path, only_web: bool = False, only_ma
with open(source / "docs/index.rst", "wt") as idx_f:
idx_f.write(
convert_file(source_file=source / "docs/index.md", format="md", to="rst").replace(
"\r\n", "\n" # remove carriage return in windows
"\r\n",
"\n", # remove carriage return in windows
)
+ "\n\n.. toctree::"
+ "\n :hidden:"
Expand Down
21 changes: 9 additions & 12 deletions package/requirements.sphinx.txt
Loading