Skip to content

Commit

Permalink
fix: form schema for smtp port (#742)
Browse files Browse the repository at this point in the history
  • Loading branch information
BlankParticle authored Aug 26, 2024
1 parent 52d2bfb commit 120a09c
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,11 @@ const externalAddressFormSchema = z.object({
sendName: z.string().min(1, 'You must enter a send name').max(64),
smtp: z.object({
host: z.string().min(3).includes('.'),
port: z.number().min(1).max(65535),
port: z.coerce
.number({ invalid_type_error: 'Port Must be a number' })
.int()
.min(1)
.max(65535),
username: z.string().min(1),
password: z.string().min(1),
encryption: z.enum(['none', 'ssl', 'tls', 'starttls']),
Expand Down Expand Up @@ -797,6 +801,7 @@ function AddExternalEmail() {
<FormControl>
<Input
fullWidth
inputMode="numeric"
label="SMTP Port"
{...field}
/>
Expand Down

0 comments on commit 120a09c

Please sign in to comment.