-
Notifications
You must be signed in to change notification settings - Fork 24
Open
Labels
bugSomething isn't workingSomething isn't workingrelease-blockerThe dev branch must not be merged into master while a release-blocker bug is open.The dev branch must not be merged into master while a release-blocker bug is open.
Description
We currently hard-code this call on our search page date elements:
onchange="reportValidity()"
For one thing, this appears to be doing nothing (at least in Firefox); when garbage data is entered into the field, no error is raised by the browser.
Secondly, hard-coding an inline script call is likely to fall foul of CORS restrictions in future, so we probably should not do validity checking this way.
I think we should:
- Remove the call entirely in dev.
- Try to find any cases in existing projects where this validity check is actually doing anything useful.
- If we can find any such examples, figure out why they're working and others aren't.
- Check the regex we're using for dates. It includes start and end anchors, and I don't think they're necessary, so it's possible that they're borking the pattern and causing the browser to ignore it.
- If there is a way to get it working as expected, replace the hard-coded onchange event call with an event listener added on load.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingrelease-blockerThe dev branch must not be merged into master while a release-blocker bug is open.The dev branch must not be merged into master while a release-blocker bug is open.