diff --git a/modules/os2forms_nemid/src/Element/NemidCprFetchData.php b/modules/os2forms_nemid/src/Element/NemidCprFetchData.php index 5c20fbb8..8906b980 100644 --- a/modules/os2forms_nemid/src/Element/NemidCprFetchData.php +++ b/modules/os2forms_nemid/src/Element/NemidCprFetchData.php @@ -16,7 +16,7 @@ public static function getCompositeElements(array $element) { $elements = parent::getCompositeElements($element); // Pattern for CPR. - $elements[self::getValueElementName()]['#pattern'] = '\d{6}-\d{4}'; + $elements[self::getValueElementName()]['#pattern'] = '\d{6}(-)?\d{4}'; return $elements; }