Add JSON Schema for VA Form 22-1990n#1
Draft
voidspooks wants to merge 1 commit into
Draft
Conversation
Generated by Optimus (https://github.com/aquia-inc/optimus). All files require human review before merging. Files: - src/schemas/22-1990n/schema.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
New schema — VA Form 22-1990n
Summary
This PR introduces a new JSON Schema (Draft-04) for VA Form 22-1990n — the Application for VA Education Benefits Under the National Call to Service (NCS) Program. The schema is defined in
src/schemas/22-1990n/schema.jsand covers the core data structures needed to validate form submissions.Key highlights of the schema include:
ssn— 9-digit Social Security Number (no hyphens), enforced via regex pattern and min/maxLengthdate— ISO 8601 format (YYYY-MM-DD), validated with bothformat: dateand a regex patternphone— 10-digit US phone number (digits only), enforced via regex pattern and min/maxLengthpostalCode— US ZIP code (5-digit format), with pattern validationadditionalProperties: falseis set at the root level to enforce strict property boundaries and prevent unexpected fields from passing validationbuildDefinitionReferencehelper that generates$refpointers to#/definitions/<referenceId>, keeping the schema DRY and consistentFiles
src/schemas/22-1990n/schema.jsNotes for reviewer
package.jsonbackend-review-groupas a reviewerssndefinition deliberately strips hyphens — consuming applications should ensure any formatted input (e.g.,123-45-6789) is normalized before submissiondatedefinition applies bothformat: dateand a regex pattern for defense-in-depth validation; confirm this is consistent with how other schemas in this repo handle date fieldsphonedefinition accepts digits only with no formatting characters — frontend validation should handle stripping before submissionrequiredarray, as this was not visible in the provided artifact excerptpostalCodepattern handles ZIP+4 format (XXXXX-XXXX) if needed by this form, or intentionally restricts to 5-digit onlyPull Requests to update the schema in related repositories