Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ORV2-3187 - Disallow non-numeric characters in transaction ID field on refund screen #1712

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

glen-aot
Copy link
Collaborator

@glen-aot glen-aot commented Dec 11, 2024

Description

Update transaction id input on refund screen to only accept numeric characters up to a max length of 15

Fixes #ORV2-3187

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • I have read the CONTRIBUTING doc
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have already been accepted and merged

Thanks for the PR!

Deployments, as required, will be available below:

Please create PRs in draft mode. Mark as ready to enable:

After merge, new images are promoted to:

const filterNonNumericValue = (input?: string) => {
if (!input) return "";
// only allows 0-9 inputs
return input.replace(/[^\d]/g, "");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this correct? you're just removing anything non-digit from the input. Shouldn't you display an error message asking the user to correct their input instead of just deleting non-numeric characters in their input?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@krishnan-aot during todays dev sync Michael has confirmed that we are okay with this behavior - an error message pertaining to non-numeric values may be implemented in the future

Copy link

sonarcloud bot commented Dec 12, 2024

Copy link

sonarcloud bot commented Dec 12, 2024

Copy link

sonarcloud bot commented Dec 12, 2024

Copy link

sonarcloud bot commented Dec 12, 2024

Copy link

sonarcloud bot commented Dec 12, 2024

Quality Gate Failed Quality Gate failed for 'onroutebc frontend'

Failed conditions
22.6% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants