This repository was archived by the owner on Apr 23, 2019. It is now read-only.
Improve form validation (SNAPSHOT branch)#28
Merged
wsargent merged 2 commits intoplayframework:SNAPSHOTfrom Mar 24, 2017
Merged
Improve form validation (SNAPSHOT branch)#28wsargent merged 2 commits intoplayframework:SNAPSHOTfrom
wsargent merged 2 commits intoplayframework:SNAPSHOTfrom
Conversation
Was removed accidentally(?) during project migration to Play! 2.5.x (commit playframework@0fd5663#diff-0c0b9b13cca77d9ddde990e265217b23)
They're not supported by all brwsers, see http://caniuse.com/#feat=input-datetime.
Member
|
Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two related changes are proposed:
date-type input elements are not supported by all browsers (see http://caniuse.com/#feat=input-datetime). After setting wrong text (e.g. "xxx") in Selenium test, Firefox sends it to the server (Firefox does not support date-type inputs), but HtmlUnit sends empty text. There are two such fields in the project - "Introduced date" and "Discontinued date" in computer creation/edition form.
server-side form validation testing code (in IntegrationTest) was removed accidentally(?) during project migration to Play! 2.5.x (commit 0fd5663#diff-0c0b9b13cca77d9ddde990e265217b23)
When restoring validation code, changing date-type inputs to text-type ones is required to pass any entered text to the server for server-side validation of the form.
After merging this PR, apply similar changes to master branch.