wtforms-validators
Additional validators for wtforms used in web applications frequently.
Installation
pip install wtforms-validators
Validators
- Accepted
- ActiveUrl
- Alpha
- AlphaDash
- AlphaSpace
- AlphaNumeric
- NotEqualTo
- Integer
- IsJson
- DisposableEmail
Examples :
from wtforms_validators import ActiveUrl, Alpha
...
class SignupForm(Form):
login_id = StringField('login Id', [DataRequired(), Alpha()])
url = StringField('profile url', [DataRequired(), ActiveUrl()])
Accepted:
Validates if the field is yes, on, 1, true or True. Can be used for validating terms of service, opt-ins etc.,
Parameters:
- message - (optional) - Error message to raise in case of a validation error.
ActiveUrl:
Validates if the URL is active by checking A or AAAA DNS records.
Parameters:
- message - (optional) - Error message to raise in case of a validation error.
Alpha:
Validates the field to include alphabetic characters only.
Parameters:
- message - (optional) - Error message to raise in case of a validation error.
AlphaDash:
Validates the field to only include alphabets and dash(-).
Parameters:
- message - (optional) - Error message to raise in case of a validation error.
AlphaSpace:
Validates the field to only include alphabets and spaces.
Note: This validator does not strip the field's value, so input containing only spaces will still be valid. You will either have to register a filter to strip input data or add another validator to check if the field cannot contain only spaces.
Parameters:
- message - (optional) - Error message to raise in case of a validation error.
AlphaNumeric:
Validates the field to only include alphabets and numbers.
Parameters:
- message - (optional) - Error message to raise in case of a validation error.
NotEqualTo:
Checks the field under validation is not equal to another field.
Parameters:
- fieldname – The name of the other field.
- message - (optional) - Error message to raise in case of a validation error.
Integer
Validates the field to only include numbers.
Parameters:
- message - (optional) - Error message to raise in case of a validation error.
IsJson
The field under validation must be a valid JSON string.
Parameters:
- message - (optional) - Error message to raise in case of a validation error.
DisposableEmail
The email address should not belong to a disposable email service provider.
Parameters:
- message - (optional) - Error message to raise in case of a validation error.
Metadata
Release files for wtforms-validators 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| wtforms-validators-1.0.0.tar.gz | 3.5 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| wtforms_validators-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.3 kB
Release files / wtforms-validators-1.0.0.tar.gz
| Download URL | wtforms-validators-1.0.0.tar.gz |
|---|---|
| Size | 3.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6bafc63fb4a000d097da010d8e89dddffe93e894f2ff91069117f774b93e1f7c
|
|
BLAKE2b-256 checksum How to use checksums |
c4b783c8a2a1dfa7381bc17219f41ef4e6888f44b2d1f42807df45b269a038d8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.7
|
Release files / wtforms_validators-1.0.0-py3-none-any.whl
| Download URL | wtforms_validators-1.0.0-py3-none-any.whl |
|---|---|
| Size | 4.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b61e2da9b3cb8ce77e59550168eb9c445b13f4ad3b262c26b0bb2801aed2462e
|
|
BLAKE2b-256 checksum How to use checksums |
caa8347ab9f43023faf275857469424425637c297746ad0cbe3d50379d6c6543
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.7
|
Security for wtforms-validators 1.0.0
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.