<commit_before>import fullSchemaHca from 'vets-json-schema/dist/10-10EZ-schema.json';
import currentOrPastDateUI from 'platform/forms-system/src/js/definitions/currentOrPastDate';
import {
  MedicareClaimNumberDescription,
  MedicareEffectiveDateDescription,
} from '../../../components/FormDescriptions';
import CustomReviewField from '../../../components/ReviewFields/CustomReviewField';
import CustomDateReviewField from '../../../components/ReviewFields/CustomDateReviewField';

const {
  medicareClaimNumber,
  medicarePartAEffectiveDate,
} = fullSchemaHca.properties;

export default {
  uiSchema: {
    medicarePartAEffectiveDate: {
      ...currentOrPastDateUI('What is your Medicare Part A effective date?'),
      'ui:description': MedicareEffectiveDateDescription,
      'ui:reviewField': CustomDateReviewField,
    },
    medicareClaimNumber: {
      'ui:title': 'What is your Medicare claim number?',
      'ui:description': MedicareClaimNumberDescription,
      'ui:reviewField': CustomReviewField,
      'ui:errorMessages': {
        required: 'Please enter a valid 11-character Medicare claim number',
      },
      'ui:options': {
        hideIf: form => !form['view:hcaMedicareClaimNumberEnabled'],
      },
    },
  },
  schema: {
    type: 'object',
    required: ['medicarePartAEffectiveDate', 'medicareClaimNumber'],
    properties: {
      medicarePartAEffectiveDate,
      medicareClaimNumber,
    },
  },
};<commit_msg>Update where required flag lives in schema (#21907)<commit_after>import fullSchemaHca from 'vets-json-schema/dist/10-10EZ-schema.json';
import currentOrPastDateUI from 'platform/forms-system/src/js/definitions/currentOrPastDate';
import {
  MedicareClaimNumberDescription,
  MedicareEffectiveDateDescription,
} from '../../../components/FormDescriptions';
import CustomReviewField from '../../../components/ReviewFields/CustomReviewField';
import CustomDateReviewField from '../../../components/ReviewFields/CustomDateReviewField';

const {
  medicareClaimNumber,
  medicarePartAEffectiveDate,
} = fullSchemaHca.properties;

export default {
  uiSchema: {
    medicarePartAEffectiveDate: {
      ...currentOrPastDateUI('What is your Medicare Part A effective date?'),
      'ui:description': MedicareEffectiveDateDescription,
      'ui:reviewField': CustomDateReviewField,
      'ui:required': () => true,
    },
    medicareClaimNumber: {
      'ui:title': 'What is your Medicare claim number?',
      'ui:description': MedicareClaimNumberDescription,
      'ui:reviewField': CustomReviewField,
      'ui:required': formData => formData['view:hcaMedicareClaimNumberEnabled'],
      'ui:errorMessages': {
        required: 'Please enter a valid 11-character Medicare claim number',
      },
      'ui:options': {
        hideIf: formData => !formData['view:hcaMedicareClaimNumberEnabled'],
      },
    },
  },
  schema: {
    type: 'object',
    properties: {
      medicarePartAEffectiveDate,
      medicareClaimNumber,
    },
  },
};
{'fraction_non_alphanumeric': 0.12445488091244548, 'fraction_numerical': 0.0057027843005702785, 'mean_word_length': 4.0456852791878175, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3755383', 'n_tokens_mistral': 867, 'n_tokens_neox': 859, 'n_words': 161}