Validate contribution
I found this code can be useful for my Java assignment. Good thing is we can use the third party code now (properly cited!).
However it's missed a few features. So I've added those and sent the diff to the author:
1. regexp validation 2. rule can be optional - validate only if not empty