Skip to content

Commit

Permalink
Merge pull request #39310 from Krishna2323/krishna2323/issue/38451
Browse files Browse the repository at this point in the history
  • Loading branch information
blimpich authored Apr 1, 2024
2 parents b3987f0 + 21ca290 commit b693e17
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/pages/tasks/TaskTitlePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import withCurrentUserPersonalDetails from '@components/withCurrentUserPersonalD
import type {WithCurrentUserPersonalDetailsProps} from '@components/withCurrentUserPersonalDetails';
import useLocalize from '@hooks/useLocalize';
import useThemeStyles from '@hooks/useThemeStyles';
import * as ErrorUtils from '@libs/ErrorUtils';
import Navigation from '@libs/Navigation/Navigation';
import * as ReportUtils from '@libs/ReportUtils';
import withReportOrNotFound from '@pages/home/report/withReportOrNotFound';
Expand All @@ -32,7 +33,9 @@ function TaskTitlePage({report, currentUserPersonalDetails}: TaskTitlePageProps)
const errors: FormInputErrors<typeof ONYXKEYS.FORMS.EDIT_TASK_FORM> = {};

if (!title) {
errors.title = 'newTaskPage.pleaseEnterTaskName';
ErrorUtils.addErrorMessage(errors, INPUT_IDS.TITLE, 'newTaskPage.pleaseEnterTaskName');
} else if (title.length > CONST.TITLE_CHARACTER_LIMIT) {
ErrorUtils.addErrorMessage(errors, INPUT_IDS.TITLE, ['common.error.characterLimitExceedCounter', {length: title.length, limit: CONST.TITLE_CHARACTER_LIMIT}]);
}

return errors;
Expand Down

0 comments on commit b693e17

Please sign in to comment.