Skip to content
This repository has been archived by the owner on Dec 19, 2023. It is now read-only.

Commit

Permalink
Merge pull request #124 from bellcom/develop
Browse files Browse the repository at this point in the history
DVK-310-59869 changing CPR format on form validate
  • Loading branch information
stankut authored Aug 23, 2021
2 parents da78de0 + 4e4b7fd commit 51e5198
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,7 @@ function valghalla_external_server_signup_signup_form_validate($form, &$form_sta
if (preg_match('/^[0-9]{10}$/', $cpr)) {
$cpr = substr($cpr, 0, 6) . '-' . substr($cpr, 6, 4);
$form_state['input']['cpr'] = $cpr;
form_set_value($form['cpr'], $cpr, $form_state);
}
if (!preg_match('/[0-9]{6}-[0-9]{4}/', $cpr)) {
form_set_error('cpr', t('Forkert CPR-format, korrekt format er 123456-7890'));
Expand Down

0 comments on commit 51e5198

Please sign in to comment.