Added the ability to validate by inline and external predicate functions