user-defined function validation