department-of-veterans-affairs/vets-website

View on GitHub
src/applications/appeals/995/validations/index.js

Summary

Maintainability
A
35 mins
Test Coverage
import { errorMessages, PRIMARY_PHONE } from '../constants';

export const missingPrimaryPhone = (error, _fieldData, formData) => {
  if (!formData?.[PRIMARY_PHONE]) {
    error.addError?.(errorMessages.missingPrimaryPhone);
  }
};