import { validatePerson, validateVcard } from 'cic-schemas-data-validator';

async function personValidation(person: any): Promise<void> {
  const personValidationErrors: any = await validatePerson(person);

  if (personValidationErrors) {
    personValidationErrors.map((error) => console.error(`${error.message}`));
  }
}

async function vcardValidation(vcard: any): Promise<void> {
  const vcardValidationErrors: any = await validateVcard(vcard);

  if (vcardValidationErrors) {
    vcardValidationErrors.map((error) => console.error(`${error.message}`));
  }
}

export { personValidation, vcardValidation };
