Opened 12 years ago

Last modified 23 months ago

#17637 closed New feature

Client side validation classes for forms — at Initial Version

Reported by: karthikabinav Owned by: nobody
Component: Forms Version: 1.3
Severity: Normal Keywords: Forms, Client Side validation, js
Cc: Carlton Gibson Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Having client side javascript validation for forms having common fields like username having only alphanumerics or password and Confirm password fields matching by providing a validation class.

For example a user should be able to do something like :

forms.TextField(validators ="usernameValidation")

And automatically a javascript validation for this form field should be in place.

One way to do it could be using HTML5 attributes like ticket #16304.

Change History (1)

by karthikabinav, 12 years ago

Attachment: pattern_charfield.patch added

Supply accepted characters as a regular expression in CharField forms. Uses HTML5 attribute 'pattern' to provide the client side validation.

Note: See TracTickets for help on using tickets.
Back to Top