[Koha-bugs] [Bug 26285] Use country code + number (E.164) validation for SMS numbers
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Wed Sep 2 16:34:01 CEST 2020
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26285
Martin Renvoize <martin.renvoize at ptfs-europe.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #109034|0 |1
is obsolete| |
--- Comment #10 from Martin Renvoize <martin.renvoize at ptfs-europe.com> ---
Created attachment 109542
-->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=109542&action=edit
Bug 26285: Follow E.164 pattern for validating SMS numbers
Currently, Koha is not correctly validating SMS numbers using
E.164. This causes Australian phone numbers without a country code
to fail validation.
This patch uses the E.164 pattern of 1-3 digits for country code,
prefixed by a + symbol, and followed by up to 12 digits for
the remainder of the phone number.
To test:
0. Don't apply patch yet
1. Set "SMSSendDriver" to "Anything"
2. Go to
http://localhost:8081/cgi-bin/koha/members/memberentry.pl?op=modify&destination=circ&borrowernumber=51
3. Type in 0455555555 and note "Please enter a valid phone number." message in
browser
6. Apply the patch
7. Go to
http://localhost:8081/cgi-bin/koha/members/memberentry.pl?op=modify&destination=circ&borrowernumber=51
8. Type in 0455555555 and note no validation error
9. Type in +61455555555 and note no validation error
10. Type in 123456789012 and note no validation error
11. Type in 1234567890123 and note "Please enter a valid phone number." error
12. Type in +900123456789012 and note no validation error
13. Type in 900123456789012 and note "Please enter a valid phone number." error
Signed-off-by: Sally <sally.healey at cheshiresharedservices.gov.uk>
Signed-off-by: Katrin Fischer <katrin.fischer.83 at web.de>
Signed-off-by: Martin Renvoize <martin.renvoize at ptfs-europe.com>
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list