https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14620
Lari Taskula <lari.task...@hypernova.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #67812|0 |1 is obsolete| | --- Comment #27 from Lari Taskula <lari.task...@hypernova.fi> --- Created attachment 93930 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=93930&action=edit Bug 14620: Contact information validations This patch adds a phone number validation by regex and centralizes different validation methods into Koha::Validation class. Introduces a new system preference, ValidatePhoneNumber, that takes a regular expression and uses it to validate phone numbers both client and server side. Unit tests to test: 1. prove t/db_dependent/Koha/Validation.t To test: 1. Apply the patches and run updatedatabase.pl to install the new system preference 2. Set system preference ValidatePhoneNumber to any regex you like (there is an example in the description of the preference) 3. Navigate to edit user contact informations in Staff client and OPAC. 4. Insert invalid email (e.g. "invalid") and invalid phone number ("+123invalid") and send the form. 5. Confirm that form will not be submitted and errors will be given. 6. Disable JavaScript and test that these errors will also be provided by the server. Sponsored-by: Koha-Suomi Oy -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/