fix: add maxLength limits to document input fields (#1988)

This commit is contained in:
Ephraim Duncan
2025-09-09 07:52:03 +00:00
committed by GitHub
parent 4550bca3d3
commit 93a3809f6a
8 changed files with 33 additions and 20 deletions

View File

@ -221,6 +221,7 @@ export const AddSettingsFormPartial = ({
className="bg-background"
{...field}
disabled={document.status !== DocumentStatus.DRAFT || field.disabled}
maxLength={255}
onBlur={handleAutoSave}
/>
</FormControl>

View File

@ -690,6 +690,7 @@ export const AddSignersFormPartial = ({
}
data-testid="signer-email-input"
onKeyDown={onKeyDown}
maxLength={254}
onBlur={handleAutoSave}
/>
</FormControl>
@ -728,6 +729,7 @@ export const AddSignersFormPartial = ({
!canRecipientBeModified(signer.nativeId)
}
onKeyDown={onKeyDown}
maxLength={255}
onBlur={handleAutoSave}
/>
</FormControl>

View File

@ -262,7 +262,7 @@ export const AddSubjectFormPartial = ({
</FormLabel>
<FormControl>
<Input {...field} />
<Input {...field} maxLength={254} />
</FormControl>
<FormMessage />
@ -300,7 +300,7 @@ export const AddSubjectFormPartial = ({
</FormLabel>
<FormControl>
<Input {...field} />
<Input {...field} maxLength={255} />
</FormControl>
<FormMessage />
</FormItem>
@ -326,7 +326,11 @@ export const AddSubjectFormPartial = ({
</FormLabel>
<FormControl>
<Textarea className="bg-background mt-2 h-16 resize-none" {...field} />
<Textarea
className="bg-background mt-2 h-16 resize-none"
{...field}
maxLength={5000}
/>
</FormControl>
<FormMessage />
</FormItem>