Skip to content

Commit

Permalink
Merge pull request #82 from OS2Forms/f/cprfetchdata-ajax-error
Browse files Browse the repository at this point in the history
F/cprfetchdata ajax error
  • Loading branch information
stankut authored Jan 16, 2024
2 parents 1c87f1d + fa02e4d commit bb6b90b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ before starting to add changes. Use example [placed in the end of the page](#exa

## [Unreleased]

- CprFetchData adding ajax error fix

## [3.14.0]

- [OS-64] Setting a standard value for Automatic purge [#80](https://github.com/OS2Forms/os2forms/pull/80)
Expand Down
6 changes: 4 additions & 2 deletions modules/os2forms_nemid/src/Element/NemidCprFetchData.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@ class NemidCprFetchData extends CompositeFetchDataBase {
public static function getCompositeElements(array $element) {
$elements = parent::getCompositeElements($element);

// Pattern for CPR.
$elements[self::getValueElementName()]['#pattern'] = '\d{6}(-)?\d{4}';
if ($element) {
// Pattern for CPR.
$elements[static::getValueElementName()]['#pattern'] = '\d{6}(-)?\d{4}';
}

return $elements;
}
Expand Down

0 comments on commit bb6b90b

Please sign in to comment.