department-of-veterans-affairs/vets-website

View on GitHub
src/applications/pensions/config/chapters/01-applicant-information/mailingAddress.js

Summary

Maintainability
A
0 mins
Test Coverage
import {
  addressSchema,
  addressUI,
  titleUI,
} from 'platform/forms-system/src/js/web-component-patterns';

/** @type {PageSchema} */
export default {
  title: 'Mailing address',
  path: 'applicant/mail-address',
  uiSchema: {
    ...titleUI('Mailing address'),
    veteranAddress: addressUI({
      labels: {
        militaryCheckbox:
          'I receive mail outside of the United States on a U.S. military base',
      },
      omit: ['street3'],
    }),
  },
  schema: {
    type: 'object',
    required: ['veteranAddress'],
    properties: {
      veteranAddress: addressSchema({ omit: ['street3'] }),
    },
  },
};