Closed sirschuyler closed 2 years ago
@sirschuyler thanks for your suggestion.
The current donation forms are using the html input required
attribute for simple front-end validation. Along with that we validate on submission which adds the GiveWP error notices like below:
At this time we don't have plans to improve this experience. We do however have plans to improve donation forms overall in the future with a more modern approach that will have much more consistent error handling. Closing this for now, but stay tuned for what the future has in store!
Bug Report
User Story
As a donor, I want see consistent errors so that I trust the site and am not confused by mismatched error types.
Details
HTML5 form validation of "Personal Information" fields (give-first, give-last, give-email) displaying default validation bubbles in browser.
Current Behavior
HTML5 form validation of "Personal Information" fields (give-first, give-last, give-email) displaying default validation bubbles in browser.
Expected Behavior
Validation of "Personal Information" fields (give-first, give-last, give-email) do NOT display default HTML5 validation bubbles, instead Give's custom validation errors are shown as they typically are (see Safari which does not prevent submit or display HTML5 default validation bubbles).
Bug Type
Steps to Reproduce
Visuals
Possible Solution
give.js line 2500 (when formatted in browser) change (&&)
if ("function" != typeof o.checkValidity || !1 !== o.checkValidity() || (i.fadeOut(), !1 != (-1 != navigator.userAgent.indexOf("Safari") && -1 == navigator.userAgent.indexOf("Chrome")))) {
to (||)if ("function" != typeof o.checkValidity || !1 !== o.checkValidity() || (i.fadeOut(), !1 != (-1 != navigator.userAgent.indexOf("Safari") || -1 == navigator.userAgent.indexOf("Chrome")))) {
Related
Acceptance Criteria
Environment
Operating System
Browser
WordPress System Info