Admin UI Realm Settings SMS Template Invalid Form Validation
ae-wehealth opened this issue · comments
TL;DR
while trying to setup the sms template with [enslink] tag the form validation fails with error: '"must contain exactly one of "[code]" or "[longcode]"'
Expected behavior
form should have been saved since [enslink] already includes the [longcode] ( please see below )
Observed behavior
validation error on Update SMS Settings
& failed template save.
Reproduction
- I have attempted to setup new sms template for the user reports test at https://${SERVER}/realm/settings#sms
- I tried to create new SMS Template as following:
[enslink]
[longcode]
[longexpires] hours
- PreRender View displayed the message with the proper link at [enslink] tag:> https://us-az.verify.wehealth.org/v?c=7oXsNKhcSpCrpW 7oXsNKhcSpCrpW 24 hours
- UI Alerts received: Errors found for one or more SMS templates must contain exactly one of "[code]" or "[longcode]"
Screenshots
Environment
- GAEN v0.31.0
- GCE/CLOUDRUN
Proposed Resolution
To extend the form validator to include [enslink].
The SMS template SHALL contain either the [code] or [longcode] or [enslink].
Additional information
We maintain GAEN systems for the State of Arizona & Bermudas.
[enslink]
is only available if Exposure Notification Express is enabled on the realm.
A non EN Express application could enable this (under realm settings), but it will affix other settings in a manner consistent with the Apple and Google EN Express client implementations.
The bug here is actually in the preview, it shouldn't honor the tag if the realm can't use it.
Another note about EN Express mode - it will produce unexpected results on iOS if your application is not installed unless the Mobile App is registered correctly AND has "app store redirects" enabled.
@mikehelmick : thanks for the clarification.
[enslink] is only available if Exposure Notification Express is enabled on the realm.
- this tag appeared & populated automatically while creating the new sms template. We have ENX disabled on realm. However, both the enx_redirect_domain
& enx_redirect_domain_map
are configured via terraform.
The bug here is actually in the preview, it shouldn't honor the tag if the realm can't use it.
-- the template did get saved actually even with the failed validation...
Thanks for the update - we will address the validation issues and default template behavior.
Please see the proposed changes in #2154