Django Live Validation
Django Live Validation provides quick and easy client-side form validation which validates as you type. It uses the Live Validation JS library in conjunction with Django Forms. This is by no means a replacement to Django’s built in form validation, but it is a suppliment which is purely client-side baed which cuts down on server-side requests for validation. This version of django-livevalidation requires Django >= 1.2, for previous versions please use this project: http://opensource.washingtontimes.com/projects/django-livevalidation/
Install
Place 'livevalidaiton' into your INSTALLED_APPS and make sure it is above the Django admin since it overrides some of the admin templates:
INSTALLED_APPS = (
'livevalidation',
...
'django.contrib.admin',
)
Usage
To use livevalidation in your templates, make sure you load the headers first before doing anything:
{% include 'livevalidation/header.html' %}
This loads the JS library at js/livevalidation_standalone.compressed.js and the CSS at css/livevalidation.css. Feel free to tweak the CSS to your liking
Now you can use the templatetag to validate a form instance:
{% live_validate form [option=value ...] %}
Where the form is any django.forms.Form (or subclass) instance. The optional option=value kwargs are in pairs as follows:
validMessage - message to be used upon successful validation (DEFAULT: “Thankyou!”)
onValid - javascript function name to execute when field passes validation
onInvalid - javascript function name to execute when field fails validation
insertAfterWhatNode - id of node to have the message inserted after (DEFAULT: the field that is being validated)
onlyOnBlur - whether you want it to validate as you type or only on blur (DEFAULT: False)
wait - the time you want it to pause from the last keystroke before it validates (milliseconds) (DEFAULT: 0)
onlyOnSubmit - if it is part of a form, whether you want it to validate it only when the form is submitted (DEFAULT: False)
Metadata
Release files for django-livevalidation 0.1.1
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 | |
|---|---|---|---|---|
| django-livevalidation-0.1.1.tar.gz | 47.8 kB | Without provenance | Details |
Release files / django-livevalidation-0.1.1.tar.gz
| Download URL | django-livevalidation-0.1.1.tar.gz |
|---|---|
| Size | 47.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0c649030baf9130471d192f91426fdde9306ff4600bcba03055ad4fee50aade4
|
|
BLAKE2b-256 checksum How to use checksums |
588d78ca3f3478bfaf04e6ee42717afa577bf53276199e58700d5d014bc45898
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for django-livevalidation 0.1.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.