sanity-typed icon indicating copy to clipboard operation
sanity-typed copied to clipboard

Faker for `Rule.regex(..., { invert: true })`

Open saiichihashimoto opened this issue 1 year ago • 0 comments

For the regex validations, we found a library to mock those, but we need a library to not mock those. We could just mock arbitrary strings and check against the regex until we don't match. Seems risky with infinite loops. Maybe there's a way with randexp. We could alter the regex to be (?!(<the-provided-regex>)) but I'm seeing a lot about why that's not good.

saiichihashimoto avatar Dec 23 '23 20:12 saiichihashimoto