colinhacks / zod

TypeScript-first schema validation with static type inference
https://zod.dev
MIT License
33.92k stars 1.18k forks source link

feat: added support multiple parameters in .startsWith() and .endsWith() in string for ticket #3683 #3690

Closed Kumar06Lav closed 3 months ago

Kumar06Lav commented 3 months ago

Added support for multiple parameters in the .startsWith() and .endsWith() methods for string validation. This enhancement allows for more versatile input checks by enabling validation against an array of possible starting or ending values.

This implementation was done for ticket #3683

Changes:

Modified the .startsWith() method to accept an array of valid prefixes. Implemented the .endsWith() method to validate strings against multiple suffixes. Added test cases to verify the new functionality. Updated documentation to reflect the changes and provide usage examples.

netlify[bot] commented 3 months ago

Deploy Preview for guileless-rolypoly-866f8a failed.

Built without sensitive environment variables

Name Link
Latest commit efdb8355e5f0732d22d0af471a48b51a97066de8
Latest deploy log https://app.netlify.com/sites/guileless-rolypoly-866f8a/deploys/66b250ef2327390008d6dc92