Closed Bug 977124 Opened 12 years ago Closed 12 years ago

add client-side validation for email field

Categories

(Input Graveyard :: Submission, defect, P1)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: willkg, Assigned: joshua-s)

References

Details

(Whiteboard: u=user c=feedback p= s=input.2014q2)

Attachments

(1 file)

I just pushed out a new feedback form which ignores the django validation for fields. We do client-side validation of description field, but we're not doing client-side validation of the email field. I thought we were, though, so I'm puzzled. This bug covers adding client-side validation of the email field.
Making this a P1 for this quarter. Fixing this will improve submitted data. What needs to happen is that we need to add some code to validate the email field as the user is typing and do a red border if it's not a valid email address where "valid" is going to be determined by a regex of some kind. It should be a really loose regex like \w+@\w+.\w+ or something along those lines.
Priority: -- → P1
Whiteboard: u=user c=feedback p=1 s=input.2014q1
Assignee: nobody → joshua-smith
Joshua and I discussed this on IRC. The gist of it is this: 1. add client-side validation in JS to match the validation that Django does -- no error messages, just make the box red; there should be a style for that already 2. keep the server-side validation that Django does because this reduces script-kiddie-related problems I originally said we shouldn't use the HTML5 email field type, but I'm changing my mind on that. So this is a third thing to do here: 3. use the HTML5 email field type (i.e. <input type="email">)
Moving this to 2014q2.
Whiteboard: u=user c=feedback p=1 s=input.2014q1 → u=user c=feedback p= s=input.2014q2
I will try to work on it this week.
This depends on the function I created in Bug 977122.
Depends on: 977122
Attached file PR on GitHub
Landed in master in https://github.com/mozilla/fjord/commit/52e815a I'll push that out on Monday.
Pushed to prod last night.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Product: Input → Input Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: