added capability for complex validation with methods, closes #7