[Koha-bugs] [Bug 27427] Update the way form validation errors are displayed

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Jan 13 19:57:59 CET 2021


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27427

--- Comment #1 from Owen Leonard <oleonard at myacpl.org> ---
Created attachment 115118
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=115118&action=edit
Bug 27427: Update the way form validation errors are displayed

This patch adds a global default configuration for the jQuery Validation
plugin for handling how some error messages are displayed during the
process of filling out a form.

To test, apply the patch and rebuild the staff client CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).

 - In the staff client, test pages which use the jQuery form validation
   plugin, e.g. Administration -> Libraries -> New library.
   - When the page first displays, the library code and name fields
     should have a "Required" label following the inputs.
   - Enter data in each of these fields. When you tab out of the field,
     the "Required" label should turn green and be prepended with a
     checkmark icon.
   - When you empty the field you should see the default error message
     for required field, "This field is required."
   - Entering data again should hide this error and redisplay the label
     with the "valid" class.
   - Trying to submit the form when it is an invalid state should still
     block form submission and put focus in the first invalid field.
  - Test other pages which use jQuery form validation: Patron entry,
    list creation, budget creation, etc.

Known issue: Although a "change" event fires when a datepicker input is
first populated, the normal validation event isn't triggered. I'm not
sure why. This means that date inputs will still show the default red
"Required" label unless they're set again or the form is submitted.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list