Skip to main content

Django Date Validators

A set of custom validators for validating date and datetime fields for Django.

Installation

  1. Install the package using pip:
pip install django-datetime-validators
  1. Add datetime_validators to INSTALLED_APPS
INSTALLED_APPS = [
    ...,
    "datetime_validators",
]

Usage

Date Is Future Validator

Checks if a date is in the future.

from datetime_validators.validators import date_time_is_future_validator

# Using in Models
due_date = models.DateTimeField(
    validators=[date_time_is_future_validator]
)

Other Validators

  • date_is_future_validator: Checks if a date is in the future.
  • date_is_present_or_future_validator: Ensures that a date is either in the present or in the future.
  • date_is_past_validator: Validates that a date is in the past.
  • date_is_present_or_past_validator: Checks if a date is either in the present or in the past.
  • date_time_is_future_validator: Validates if a datetime is in the future.
  • date_time_is_present_or_future_validator: Checks if a datetime is either in the present or in the future.
  • date_time_is_past_validator: Ensures that a datetime is in the past.
  • date_time_is_present_or_past_validator: Validates that a datetime is either in the present or in the past.

Contributing

Contributions are more than wellcome :)

Metadata

Release files for django-datetime-validators 0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-datetime-validators 0.1
File Size Uploaded Provenance Actions
django_datetime_validators-0.1.tar.gz 3.6 kB Without provenance Details for django_datetime_validators-0.1.tar.gz

Release files / django_datetime_validators-0.1.tar.gz

Download URL django_datetime_validators-0.1.tar.gz
Size 3.6 kB
Tags Source
SHA-256 checksum
How to use checksums
0235de5bbdc783769d5d7dec0d2dfefa6475bfd899724b0186cba432a0e67ae3
BLAKE2b-256 checksum
How to use checksums
514c7e838152917139a629602eaa4ba4f0ffe0ba9f41d1e94297f0bf26ecbba7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.3

Security for django-datetime-validators 0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page