Closed Bug 1317741 Opened 8 years ago Closed 8 years ago

Firefox 49+ breaks non-US date field validation with jquery.validate

Categories

(Core :: JavaScript Engine, defect)

48 Branch
defect
Not set
normal

Tracking

()

RESOLVED WONTFIX
Tracking Status
platform-rel --- -
firefox50 --- wontfix
firefox51 --- fix-optional
firefox52 --- affected
firefox53 --- affected

People

(Reporter: gserg.g, Unassigned)

References

Details

(Keywords: regression, testcase, Whiteboard: [platform-rel-jQuery])

Attachments

(2 files, 1 obsolete file)

User Agent: Mozilla/5.0 (Windows NT 6.1; rv:47.0) Gecko/20100101 Firefox/47.0 Build ID: 20161031133903 Steps to reproduce: We are using the jquery.validate plugin for client-side validation. Date fields served in HTML look like this: <input class="text-box single-line" data-val="true" data-val-date="The field DateProperty must be a date." data-val-required="The DateProperty field is required." id="DateProperty" name="DateProperty" type="datetime" value="" /> There are no custom validation rules or additional js code to manage validation (we only reference jquery.validate.min.js and jquery.validate.unobtrusive.min.js). Our computers run Windows with en-gb locale. The client-side validation for dates stopped working properly after updating to Firefox 49, and it does not work as expected in all versions after that. It works as expected in 48.0.2 and older. Actual results: With Firefox 49.0 and above, jquery.validation would only recognize a US-formatted date as a date. If we put 11/15/2016 into the field (US format), client-side validation succeeds and the form submits, but if we put in 15/11/2016 (UK format), the validation plugin claims it is not a date, shows the contents of the data-val-date attribute and does not let the form submit. Expected results: With Firefox 48.0.2 and older, if we put 15/11/2016 (UK format), the validation plugin detects it as a date and allows the form to submit.
Can you provide live testcase?
Flags: needinfo?(gserg.g)
Keywords: testcase-wanted
Attached file test.html (obsolete) —
Flags: needinfo?(gserg.g)
Attached file 1317741.html
Same testcase with HTTPS links.
Attachment #8811076 - Attachment is obsolete: true
https://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=eeb734 78d98476877f2035f0c330fdc89e361803&tochange=138521110469d3a80c58ae4571e7d0cf8e6d e07c Morgan Phillips — Bug 1265136 - Modify Date.parse's handling of two digit years to improve cross-compatibility; r=Waldo Morgan, is this parsing error expected with European date format (dd/mm/yyyy)?
Blocks: 1265136
Component: Untriaged → JavaScript Engine
Flags: needinfo?(winter2718)
Product: Firefox → Core
Version: 49 Branch → 48 Branch
The testcase doesn't work in Safari or Chrome, but does work in IE/Edge
platform-rel: --- → ?
Whiteboard: [platform-rel-jQuery]
Sounds like this might be intended behavior?
Flags: needinfo?(winter2718) → needinfo?(jorendorff)
The testcase not working in Safari or Chrome, and this changing because we acted to join them, suggests to me that this is probably not something we're going to change, yeah.
Can you file an issue with the JQuery Validate plugin maintainers: https://github.com/jzaefferer/jquery-validation/issues/new to let them know this will be broken for them in newer Firefox versions as well as Chrome and Safari?
platform-rel: ? → -
Flags: needinfo?(jorendorff) → needinfo?(gserg.g)
Given comment 8, I'm closing this WONTFIX.
Status: UNCONFIRMED → RESOLVED
Closed: 8 years ago
Resolution: --- → WONTFIX
Flags: needinfo?(gserg.g)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: