[Koha-bugs] [Bug 10237] Enforce authorized value character limitations

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Jun 14 14:40:16 CEST 2013


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10237

Kyle M Hall <kyle at bywatersolutions.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #18117|0                           |1
        is obsolete|                            |

--- Comment #6 from Kyle M Hall <kyle at bywatersolutions.com> ---
Created attachment 19002
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=19002&action=edit
Bug 10237 - Enforce authorized value character limitations

An authorized value should not have spaces or special characters other
than underscores and hyphens in it, but this limitation is not enforced.
This patch adds client-side validation blocking entries which contain
anything other than numbers, letters, underscores, or dashes. Changes
include:

- The addition of a custom alphanumeric validation scheme which can be
  used anywhere in Koha.
- The addition of a new translatable warning message which appears when
  the alphanumeric validation scheme is violated.
- The addition of rules to the authorized_values.tt template to enable
  the new alphanumeric validation scheme.

To test, apply the patch and clear your browser cache.

With an existing category of authorized values (like ccode):

- Click to add new authorized value
- Try to enter invalid data in the "authorized value" form field. You
  should see a warning.
- Try to submit a form with the invalid data. You should be prevented
  from doing to.
- Correct the invalid data to conform to the validation rules. Warnings
  should disappear.
- Submit the form. It should submit correctly.

With a new category:

- Click to create a new category.
- Try to enter invalid data in the "category" and "authorized value"
  form fields. You should see warnings.
- Try to submit a form with the invalid data. You should be prevented
  from doing to.
- Correct the invalid data to conform to the validation rules. Warnings
  should disappear.
- Submit the form. It should submit correctly.

Signed-off-by: Kyle M Hall <kyle at bywatersolutions.com>

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


More information about the Koha-bugs mailing list