Skip to content

Commit

Permalink
Add validation for account holder
Browse files Browse the repository at this point in the history
  • Loading branch information
monishdeb committed Sep 30, 2020
1 parent f0c04f1 commit f5d64a3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CRM/Core/Payment/iATSServiceACHEFT.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,11 @@ public function getPaymentFormFieldsMetadata() {
'is_required' => TRUE,
'attributes' => ['CHECKING' => 'Chequing', 'SAVING' => 'Savings'],
];
$metadata['account_holder']['rules'][] = [
'rule_message' => ts('Account Holder must contain at least 1 alphabetic character.'),
'rule_name' => 'regex',
'rule_parameters' => '/^(?:[a-zA-Z]+)[a-zA-Z.\'"]*$/',
];
return $metadata;
}

Expand Down

0 comments on commit f5d64a3

Please sign in to comment.