Add FacebookURLField and TwitterURLField with validation

VERIFIED FIXED in 2.4.1

Status

support.mozilla.org
Users and Groups
VERIFIED FIXED
7 years ago
7 years ago

People

(Reporter: jsocol, Assigned: jsocol)

Tracking

unspecified
2.4.1

Firefox Tracking Flags

(Not tracked)

Details

(Assignee)

Description

7 years ago
If we subclass URLField and add extra validation that makes sure the URL is from the right domain, our new profiles will actually require those fields be filled in correctly.

FacebookURLField(URLField):
    """Requires the domain be Facebook."""

TwitterURLField(URLField):
    """Requires the domain be Twitter."""

We could also add widgets with HTML5 Forms patterns to do client-side validation.
(Assignee)

Comment 1

7 years ago
(In reply to comment #0)
> We could also add widgets with HTML5 Forms patterns to do client-side
> validation.

Actually, we don't need to add widget classes, we can just add custom attributes.
(Assignee)

Updated

7 years ago
Assignee: nobody → james
(Assignee)

Comment 2

7 years ago
Fixed! https://github.com/jsocol/kitsune/commit/7951ad0

Ignore the implementation suggestions in the first two comments.
Status: NEW → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → FIXED
Verified
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.