From 43add7471123d0f5b2292909aafba570a248c9ea Mon Sep 17 00:00:00 2001 From: Stanislav Kutasevits Date: Thu, 19 Oct 2023 11:56:02 +0300 Subject: [PATCH 1/2] Checking CPR format before fetching data --- .../os2forms_nemid/src/Element/NemidCprFetchData.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/modules/os2forms_nemid/src/Element/NemidCprFetchData.php b/modules/os2forms_nemid/src/Element/NemidCprFetchData.php index 1dc01d27..5c20fbb8 100644 --- a/modules/os2forms_nemid/src/Element/NemidCprFetchData.php +++ b/modules/os2forms_nemid/src/Element/NemidCprFetchData.php @@ -9,6 +9,18 @@ */ class NemidCprFetchData extends CompositeFetchDataBase { + /** + * {@inheritdoc} + */ + public static function getCompositeElements(array $element) { + $elements = parent::getCompositeElements($element); + + // Pattern for CPR. + $elements[self::getValueElementName()]['#pattern'] = '\d{6}-\d{4}'; + + return $elements; + } + /** * {@inheritdoc} */ From d2039b5b031b85919a12f92742efe38de0fcb024 Mon Sep 17 00:00:00 2001 From: Stanislav Kutasevits Date: Thu, 19 Oct 2023 13:16:53 +0300 Subject: [PATCH 2/2] Preparing 3.13.1 --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d8162bfb..8b93e9c8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,10 @@ before starting to add changes. Use example [placed in the end of the page](#exa ## [Unreleased] +## [3.13.1] 2023-10-19 + +- Checking CPR format before fetching data + ## [3.13.0] 2023-10-11 - [#62](https://github.com/OS2Forms/os2forms/pull/62)