Add regex validation for registrationNumber in the Organization schema to ensure data consistency.
Context
Company registration numbers usually follow specific formats. Validating this on the server prevents junk data and simplifies future KYB verification processes.
Implementation Guidelines
Key Files: src/server/validations/kyb.schema.ts (or organization related schema).
- Identify the
registrationNumber field in the Zod schema.
- Apply
.regex() with the appropriate pattern for the target jurisdiction.
Expectations
What done looks like: Entering "ABC-123" for a registration number that expects "XXXXXXXX" digits results in a validation error.
Discord for any question: codeze_us
Add regex validation for
registrationNumberin the Organization schema to ensure data consistency.Context
Company registration numbers usually follow specific formats. Validating this on the server prevents junk data and simplifies future KYB verification processes.
Implementation Guidelines
Key Files:
src/server/validations/kyb.schema.ts(or organization related schema).registrationNumberfield in the Zod schema..regex()with the appropriate pattern for the target jurisdiction.Expectations
What done looks like: Entering "ABC-123" for a registration number that expects "XXXXXXXX" digits results in a validation error.
Discord for any question: codeze_us