Skip to content

Commit

Permalink
Merge pull request #69 from OS2Forms/develop
Browse files Browse the repository at this point in the history
3.13.1 deploy
  • Loading branch information
stankut authored Oct 19, 2023
2 parents a682232 + 8a718f9 commit 684d802
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
12 changes: 12 additions & 0 deletions modules/os2forms_nemid/src/Element/NemidCprFetchData.php
Original file line number Diff line number Diff line change
Expand Up @@ -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}
*/
Expand Down

0 comments on commit 684d802

Please sign in to comment.