test for custom validation with func