Using Zod to check for alphanumeric value

1.1k views Asked by At

I know I can combine Validator.js with Zod to check if an input is alphanumeric. However, is there a built-in way with Zod to check for alphanumeric WITHOUT having to use regex?

1

There are 1 answers

0
Dimava On BEST ANSWER

Zod does not have those, because their regex implementation is straightforward (unlike email or IP(it checks for numbers to be 0-255)), and if implementation for your case is not it recommends using validator.JS (e.g. language-dependent alphanumeric)