spumko/joi — pull request #87 by pid (2013-04-23 15:13:12+00:00)
Title: added xregex validator which must exactly match the input term

...not like the existing regex-validator, which have only to match the input term

long story short, please take a look at the examples:
term = "abcdef1234"
r = /[a-z]{3,5}/

regex-validator will match
xregex-valdator won't match

to get this work with existing validator, I have to chain: regex(r).max(5), **but**

term = "abc12"
r = /[a-z]{3,5}/

regex-validator will match (regex(r).max(5))
xregex-valdator won't match

term = "twitter_name!/()"
r = /[a-zA-Z0-9_]{3,15}/

regex-validator will match
xregex-valdator won't match

--
I didn't find the right (practicable) solution for this, so I added xregex-validator ;-)