Rename values to source to match the documentation.
Improve testing for rule type and add register() method to allow custom
rule types and validation methods.
Update validator method signatures to match the documentation.
Tidy validator signatures.
Update validator documentation.