From 5b7b222fd975b83e45c250418008ebed0723ea76 Mon Sep 17 00:00:00 2001 From: yoution Date: Fri, 15 Jan 2021 08:05:48 +0800 Subject: [PATCH] fix: issue #4263 add validation --- .../detail/components/JobPickerRow/JobPickerRow.jsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/projects/detail/components/JobPickerRow/JobPickerRow.jsx b/src/projects/detail/components/JobPickerRow/JobPickerRow.jsx index 6b3b08bf2..db9357a17 100644 --- a/src/projects/detail/components/JobPickerRow/JobPickerRow.jsx +++ b/src/projects/detail/components/JobPickerRow/JobPickerRow.jsx @@ -14,6 +14,8 @@ const always = () => true const never = () => false const emptyError = () => '' +const MAX_NUMBER = Math.pow(2, 31) - 1 + class JobPickerRow extends React.PureComponent { constructor(props) { super(props) @@ -117,6 +119,7 @@ class JobPickerRow extends React.PureComponent { value={value.title} className={cn('tc-file-field__inputs', { error: isRowIncomplete && !value.title.trim() })} name="title" + maxLength="128" onChange={this.handleJobTitleChange} placeholder="Job Title" /> @@ -147,7 +150,7 @@ class JobPickerRow extends React.PureComponent {