Skip to content

Commit

Permalink
Allow any number of whitespaces
Browse files Browse the repository at this point in the history
  • Loading branch information
AndyEPhipps committed Mar 27, 2024
1 parent 6448690 commit 094a0b5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/pages/GiftAid/UpdateForm/UpdateFormFields.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export const updateFormFields = {
label: 'Transaction ID',
required: true,
invalidErrorText: 'This transaction ID doesn\'t seem to be valid, please check your donation confirmation email or letter',
pattern: '^\\s{0,1}[a-zA-Z0-9-_]{5,}\\s{0,1}$',
pattern: '^\\s*[a-zA-Z0-9-_]{5,}\\s*$',
tooltip: 'This is found at the bottom of your donation confirmation email'
},
firstName: {
Expand Down
2 changes: 1 addition & 1 deletion src/pages/GiftAid/utils/Utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ export const justInTimeLinkText = 'Why do we collect this info?';
* REGEX for transactionId
*
*/
const transactionIdPattern = '^\\s{0,1}[a-zA-Z0-9-_]{5,}\\s{0,1}$';
const transactionIdPattern = '^\\s*[a-zA-Z0-9-_]{5,}\\s*$';

/**
* Function to validate form
Expand Down

0 comments on commit 094a0b5

Please sign in to comment.