Bug 22594: Validate SMS messaging numbers using the E.164 format
authorKyle M Hall <kyle@bywatersolutions.com>
Wed, 27 Mar 2019 12:35:27 +0000 (08:35 -0400)
committerNick Clemens <nick@bywatersolutions.com>
Fri, 12 Apr 2019 02:23:54 +0000 (02:23 +0000)
commita0e61d8c3e94f2b9e990cc2b60668187047b24bb
treef0ede4061a5bff379395ed5c8ae71a5a4418ba87
parent8eb22efa0893849e2967e34c821c018c6405f8d3
Bug 22594: Validate SMS messaging numbers using the E.164 format

Many SMS messaging services reject numbers that do not conform to the E.164 international public telecommunication
numbering plan.

We already tell patrons on the OPAC "Please enter numbers only. (123) 456-7890 would be entered as 1234567890."
but we do not enforce this. We should be validating the patron's SMS number on both the staff side and the patron
self-service for updating the SMS number.

Test plan:
1) Apply this patch
2) Enable SMS message ( you can set to Email to enable )
3) Test entering and updating SMS numbers on the OPAC and staff
   interfaces.
4) Note you can only enter a 1 to 14 digit number with an optional + sign
   at the beginning ( used to indicate the number includes a country calling code )

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
koha-tmpl/intranet-tmpl/prog/en/includes/validator-strings.inc
koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt
koha-tmpl/intranet-tmpl/prog/js/members.js
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt