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

103453 - Add validation for VES data - IVC CHAMPVA #21138

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

michaelclement
Copy link
Contributor

@michaelclement michaelclement commented Mar 6, 2025

Summary

This PR adds the first pass at our VES data validator. IVC CHAMPVA form 10-10d will soon be submitting to the new VES CHAMPVA API, so we need to make sure we can appropriately validate our data before sending it to VES.

  • Adds new data validator class
  • Adds some initial unit tests (more to come in a follow-on PR)

Related issue(s)

Testing done

  • New code is covered by unit tests

Screenshots

NA

What areas of the site does it impact?

None yet; this is not in use anywhere. We're prepping this module for an integration in a coming sprint.

Acceptance criteria

  • I fixed|updated|added unit tests and integration tests for each feature (if applicable).
  • No error nor warning in the console.
  • Events are being sent to the appropriate logging solution
  • Documentation has been updated (link to documentation)
  • No sensitive information (i.e. PII/credentials/internal URLs/etc.) is captured in logging, hardcoded, or specs
  • Feature/bug has a monitor built into Datadog (if applicable)
  • If app impacted requires authentication, did you login to a local build and verify all authenticated routes work as expected
  • I added a screenshot of the developed feature

Requested Feedback

NA

@va-vfs-bot va-vfs-bot temporarily deployed to 103453-ves-validate-required-fields/main/main March 6, 2025 20:18 Inactive
@va-vfs-bot va-vfs-bot temporarily deployed to 103453-ves-validate-required-fields/main/main March 6, 2025 20:38 Inactive
Copy link

github-actions bot commented Mar 6, 2025

1 Warning
⚠️ This PR changes 219 LoC (not counting whitespace/newlines).

In order to ensure each PR receives the proper attention it deserves, we recommend not exceeding
200. Expect some delays getting reviews.

File Summary

Files

  • modules/ivc_champva/app/services/ivc_champva/ves_data_validator.rb (+108/-0)

  • modules/ivc_champva/spec/services/ves_data_validator_spec.rb (+111/-0)

    Note: We exclude files matching the following when considering PR size:

    *.csv, *.json, *.tsv, *.txt, *.md, Gemfile.lock, app/swagger, modules/mobile/docs, spec/fixtures/, spec/support/vcr_cassettes/, modules/mobile/spec/support/vcr_cassettes/, db/seeds, modules/vaos/app/docs, modules/meb_api/app/docs, modules/appeals_api/app/swagger/, *.bru, *.pdf
    

Big PRs are difficult to review, often become stale, and cause delays.

Generated by 🚫 Danger

@va-vfs-bot va-vfs-bot temporarily deployed to 103453-ves-validate-required-fields/main/main March 6, 2025 21:19 Inactive
Comment on lines +3 to +6
# TODO: add validators for non-required, but structure constrained types:
# - validate phone number structure: ^(\+\d{1,2}\s)?\(?\d{3}\)?[\s.-]\d{3}[\s.-]\d{4}$
# - validate gender values
# - validate relationship to veteran
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Outside the scope of this ticket, but there will be a followup

Comment on lines +62 to +63
# ------------------------------------------------------------ #
# ------------------------------------------------------------ #
Copy link
Contributor Author

Choose a reason for hiding this comment

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

All methods below this line are the individual validation components we roll together up above.

There are currently some tests, but the goal is to get much wider coverage of these constituent parts in a follow-on PR.

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

Successfully merging this pull request may close these issues.

3 participants