import { i18n } from '@plugins/i18n';

export function validCorrectionComment(val: string): boolean | string {
  const pattern = /[0-9a-zA-Zа-яА-Я]/;
  return val
    ? pattern.test(val) ||
        String(i18n.t('validation.comments.invalidCorrectionComment'))
    : !val;
}
