Bug 163584 - Provide better form validation messages
Summary: Provide better form validation messages
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords:
Depends on:
Blocks: 164382
  Show dependency treegraph
 
Reported: 2016-10-17 20:54 PDT by Chris Dumez
Modified: 2016-11-07 09:44 PST (History)
9 users (show)

See Also:


Attachments
Patch (20.40 KB, patch)
2016-10-17 21:28 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews101 for mac-yosemite (1.07 MB, application/zip)
2016-10-17 22:25 PDT, Build Bot
no flags Details
Patch (21.43 KB, patch)
2016-10-17 22:28 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews123 for ios-simulator-wk2 (6.99 MB, application/zip)
2016-10-17 23:40 PDT, Build Bot
no flags Details
Patch (22.79 KB, patch)
2016-10-18 12:16 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2016-10-17 20:54:46 PDT
Provide better form validation messages that match more closely the ones from Chrome and Firefox.
Comment 1 Chris Dumez 2016-10-17 21:28:42 PDT
Created attachment 291916 [details]
Patch
Comment 2 Build Bot 2016-10-17 22:25:04 PDT
Comment on attachment 291916 [details]
Patch

Attachment 291916 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.webkit.org/results/2309806

New failing tests:
fast/forms/validation-message-appearance.html
Comment 3 Build Bot 2016-10-17 22:25:07 PDT
Created attachment 291918 [details]
Archive of layout-test-results from ews101 for mac-yosemite

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews101  Port: mac-yosemite  Platform: Mac OS X 10.10.5
Comment 4 Chris Dumez 2016-10-17 22:28:42 PDT
Created attachment 291919 [details]
Patch
Comment 5 Build Bot 2016-10-17 23:40:21 PDT
Comment on attachment 291919 [details]
Patch

Attachment 291919 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: http://webkit-queues.webkit.org/results/2310301

New failing tests:
fast/forms/date/input-date-validation-message.html
Comment 6 Build Bot 2016-10-17 23:40:24 PDT
Created attachment 291925 [details]
Archive of layout-test-results from ews123 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews123  Port: ios-simulator-wk2  Platform: Mac OS X 10.11.6
Comment 7 Chris Dumez 2016-10-18 12:16:32 PDT
Created attachment 291966 [details]
Patch
Comment 8 Darin Adler 2016-10-18 17:07:00 PDT
Comment on attachment 291966 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=291966&action=review

> Source/WebCore/platform/LocalizedStrings.cpp:1119
> +    return formatLocalizedString(WEB_UI_STRING("Value must be greater than or equal to %@.", "Validation message for input form controls with value lower than allowed minimum"), minimum.createCFString().get());

I think we eventually should come up with a cross platform way to do the substitution instead of relying on formatLocalizedString. Just a simple substitution rather than %@ would work.

> Source/WebCore/platform/LocalizedStrings.cpp:1129
> +    return formatLocalizedString(WEB_UI_STRING("Value must be less than or equal to %@.", "Validation message for input form controls with value higher than allowed maximum"), maximum.createCFString().get());

Ditto.
Comment 9 WebKit Commit Bot 2016-10-18 17:30:42 PDT
Comment on attachment 291966 [details]
Patch

Clearing flags on attachment: 291966

Committed r207509: <http://trac.webkit.org/changeset/207509>
Comment 10 WebKit Commit Bot 2016-10-18 17:30:48 PDT
All reviewed patches have been landed.  Closing bug.