mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-09 13:01:00 +00:00
fix(auth): cap insurerIkNumber length before the digit refine
The insurerIkNumber field went straight to the 9-digit regex refine with no upper bound, unlike its siblings insurerName and fullName which cap at 120 characters. Add a defensive .max(32) before the transform — well above the 9 digits the value ever holds — so an oversized string is rejected at the length gate rather than reaching the regex. The refine already rejects malformed input; this is hardening for consistency with the surrounding fields.
This commit is contained in:
1 parent
0ec4a16153
commit
712c5707ee
1 file changed
+1
@@ -65,6 +65,7 @@ export const profileSchema = z.object({
|
||||
// the iOS client contract). Surfaced on the FHIR `Coverage` payor.
|
||||
insurerIkNumber: z
|
||||
.string()
|
||||
.max(32)
|
||||
.nullable()
|
||||
.optional()
|
||||
.transform((v) => {
|
||||
|
||||
Reference in new issue
Block a user