Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -605,6 +605,7 @@ const CopilotRequestForm: FC<{}> = () => {
onChange={bind(handleFormValueChange, this, 'otherPaymentType')}
error={formErrors.otherPaymentType}
tabIndex={0}
maxLength={8}
/>
)}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ export interface InputTextProps {
readonly forceUpdateValue?: boolean
readonly inputControl?: UseFormRegisterReturn
readonly isLoading?: boolean
readonly maxLength?: number
}

const InputText: FC<InputTextProps> = (props: InputTextProps) => {
Expand Down Expand Up @@ -70,6 +71,7 @@ const InputText: FC<InputTextProps> = (props: InputTextProps) => {
onBlur={props.inputControl ? props.inputControl.onBlur : props.onBlur}
onChange={props.inputControl ? props.inputControl.onChange : props.onChange}
name={props.inputControl ? props.inputControl.name : props.name}
maxLength={props.maxLength}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ensure that props.maxLength is properly validated and defaults are set if necessary. Consider checking if maxLength is defined before applying it to avoid potential issues with undefined values.

/>
)

Expand Down