kennethreitz / clint

Python Command-line Application Tools
http://pypi.python.org/pypi/clint/
ISC License
95 stars 19 forks source link

Support for custom validators #158

Open danielmanser opened 8 years ago

danielmanser commented 8 years ago

It would be great if clint would support custom validators. For example, I need to verify if an IPv4/IPv6 address is correct. This is possible with Regexes, but these can get pretty complex as one could write IPv6 in a short form. I suggest a CustomValidator with a hook so a custom function can perform checks (in my case, the ipaddr Module).