commit 05edb08e886c55dd9200a42e52e1bcb7007d13f4
parent 5fe272750cf8986c9cab004d508da13b623112e2
Author: Christian Grothoff <christian@grothoff.org>
Date: Tue, 5 Mar 2024 22:47:11 +0100
document new ADDRESS_RESTRICTIONS regex option
Diffstat:
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/manpages/challenger.conf.5.rst b/manpages/challenger.conf.5.rst
@@ -71,6 +71,8 @@ AUTH_COMMAND
ADDRESS_TYPE
Type of the address that is being collected, returned as part of the ``address_type`` in the ``/info`` endpoint. Examples include ``email`` or ``phone``.
+ADDRESS_RESTRICTIONS
+ JSON object with a map of keys (names of the fields of the address to be entered by the user) to objects with a "regex" (string) containing an extended Posix regular expression for allowed address field values, and a "hint"/"hint_i18n" giving a human-readable explanation to display if the value entered by the user does not match the regex. Keys that are not mapped to such an object have no restriction on the value provided by the user. Examples would be '{"email":{"hint":"valid e-mail address required","regex":"^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$"}' or '{"zip":{"hint":"numeric zip code required","regex":"^[0-9]+$"}'.
SEE ALSO
diff --git a/taler-challenger-manual.rst b/taler-challenger-manual.rst
@@ -1,7 +1,7 @@
..
This file is part of GNU TALER.
- Copyright (C) 2023 Taler Systems SA
+ Copyright (C) 2023, 2024 Taler Systems SA
TALER is free software; you can redistribute it and/or modify it under the
terms of the GNU Affero General Public License as published by the Free Software
@@ -558,6 +558,7 @@ file) is also supported.
The template is instantiated using the following information:
+ * restrictions: Object; map of keys (names of the fields of the address to be entered by the user) to objects with a "regex" (string) containing an extended Posix regular expression for allowed address field values, and a "hint"/"hint_i18n" giving a human-readable explanation to display if the value entered by the user does not match the regex. Keys that are not mapped to such an object have no restriction on the value provided by the user. See "ADDRESS_RESTRICTIONS" in the challenger configuration.
* fix_address: boolean; indicates if the given address cannot be changed
anymore, the form should be read-only if set to true.