-
Notifications
You must be signed in to change notification settings - Fork 344
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Admin: Create 'Location' & 'Organization' does not throw errors when submitting blank form #200
Comments
This is also the browser validation that you are experiencing. The tests use a headless WebKit browser, which bypasses the client-side validation, and therefore allows the form to be submitted. Because the organization name field is marked as required in the HTML, most browsers won't let the form be submitted at all, so the server side validations will never kick in. Unfortunately, it seems some browsers don't include a visual alert that lets you know you didn't fill out a particular field. I know Chrome and Firefox do, but apparently, Safari does not , so we could either get rid of the required attribute or use a JS workaround. @anselmbradford, what are your thoughts on this? |
I just checked html5test.com in Safari and didn't realize it has such a low score for HTML5 support. |
Here is a good explanation of the constraint validation API, browser support for the various features, and workarounds: http://www.html5rocks.com/en/tutorials/forms/constraintvalidation/#toc-safari I originally added the required attribute per @anselmbradford's recommendation, but given the lack of support in IE <10, iOS Safari, and the default Android browser, I will remove it until we decide whether or not to include a workaround for the browsers that don't support it. |
My recommendation would be to always provide server-side validation first and foremost, then add standards syntax (the |
@anselmbradford I think you might be misunderstanding the user-facing consequence of including the You can try it out on the demo site, but you'll need to manually add the |
Ahh, I see it's partial support in Safari. Yes then it's not degrading properly and you'd want to remove it as you have. |
Issue: If a user does not interact with the form and clicks create no errors are thrown at all. Oddly enough the associated tests (locations & organizations) for this situation are passing.
When a location or organization form is partially filled out (incomplete from a validation perspective), clicking create throws errors at the top of the page.
The text was updated successfully, but these errors were encountered: