Skip to content

Commit

Permalink
Fix: Edit page
Browse files Browse the repository at this point in the history
  • Loading branch information
truph01 committed Jun 21, 2024
1 parent 34bbf37 commit 24c85b7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/pages/tasks/TaskDescriptionPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ function TaskDescriptionPage({report, currentUserPersonalDetails}: TaskDescripti
const validate = useCallback(
(values: FormOnyxValues<typeof ONYXKEYS.FORMS.EDIT_TASK_FORM>): FormInputErrors<typeof ONYXKEYS.FORMS.EDIT_TASK_FORM> => {
const errors = {};

if (values?.description && values.description?.length > CONST.DESCRIPTION_LIMIT) {
ErrorUtils.addErrorMessage(errors, 'description', translate('common.error.characterLimitExceedCounter', {length: values.description.length, limit: CONST.DESCRIPTION_LIMIT}));
const taskDescriptionLength = ReportUtils.getCommentLength(values.description);
if (values?.description && taskDescriptionLength > CONST.DESCRIPTION_LIMIT) {
ErrorUtils.addErrorMessage(errors, 'description', translate('common.error.characterLimitExceedCounter', {length: taskDescriptionLength, limit: CONST.DESCRIPTION_LIMIT}));
}

return errors;
Expand Down

0 comments on commit 24c85b7

Please sign in to comment.