• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

alkem-io / client-web / #5734

22 Sep 2023 11:16AM UTC coverage: 6.359%. First build
#5734

Pull #4782

travis-ci

Pull Request #4782: Remove character counters

173 of 8089 branches covered (0.0%)

Branch coverage included in aggregate %.

25 of 25 new or added lines in 5 files covered. (100.0%)

1290 of 14917 relevant lines covered (8.65%)

0.42 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/core/ui/forms/MarkdownInput/MarkdownValidator.ts
1
import { string } from 'yup';
2
import TranslationKey from '@/core/i18n/utils/TranslationKey';
3
import { ValidationMessageWithPayload } from '@/domain/shared/i18n/ValidationMessageTranslation/ValidationMessageWithPayload';
4
import { MarkdownTextMaxLength } from '../field-length.constants';
5
import { TranslatedValidatedMessageWithPayload } from '@/domain/shared/i18n/ValidationMessageTranslation';
6

7
const translationKey: TranslationKey = 'components.wysiwyg-editor.validation.maxLength';
×
8

9
const MarkdownValidator = (maxLength: MarkdownTextMaxLength, options?: { required?: boolean }) => {
×
10
  const base = string().max(maxLength, ({ max }) => TranslatedValidatedMessageWithPayload(translationKey)({ max }));
×
11
  return options?.required ? base.required(TranslatedValidatedMessageWithPayload('forms.validations.required')) : base;
12
};
13

×
14
export const isMarkdownMaxLengthError = (
15
  error: string | ValidationMessageWithPayload
16
): error is ValidationMessageWithPayload => {
×
17
  return typeof error !== 'string' && error.message === translationKey;
18
};
19

20
export default MarkdownValidator;
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc