fix: add regex validation of membership no
This commit is contained in:
@@ -42,10 +42,10 @@ export const notJoinDetailsSchema = baseDetailsSchema.merge(
|
||||
}, "Only digits are allowed")
|
||||
.refine((num) => {
|
||||
if (num) {
|
||||
return num.length === 14
|
||||
return num.match(/^30812(?!(0|1|2))[0-9]{9}$/)
|
||||
}
|
||||
return true
|
||||
}, "Membership number needs to be 14 digits"),
|
||||
}, "Invalid membership number format"),
|
||||
})
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user