Custom validator that takes a function
Merge remote-tracking branch 'firefly21/custom_validator'