Skip to content

Commit

Permalink
Merge pull request #1533 from ml10/allow-nbsp-as-seen-in-wild-in-ppd-…
Browse files Browse the repository at this point in the history
…addenda-payment-related-info

Allow NBSP (U+00A0) in PPD Addenda Payment Related Information
  • Loading branch information
adamdecaf authored Jan 9, 2025
2 parents 3135376 + 3aefa68 commit 3d6aaa7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions validators.go
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,7 @@ func (v *validator) isAlphanumeric(s string) error {
// Specific characters that are accepted
switch r {
case
0xA0, //   - Non-breaking Space
0xA2, // ¢ - Cent Sign
0xAC, // ¬ - Negation
0xA6, // ¦ - Pipe
Expand Down
2 changes: 1 addition & 1 deletion validators_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ func TestValidators__isAlphanumeric(t *testing.T) {
shouldError := tt.shouldErr(i)

switch chr {
case `¢`, `¦`, `¬`, `±`: // skip valid ASCII characters
case ` `, `¢`, `¦`, `¬`, `±`: // skip valid ASCII characters
continue

case `Ø`: // skip characters found in real world usage
Expand Down

0 comments on commit 3d6aaa7

Please sign in to comment.