changed return type of validateFunctionPattern
added 'pFunctionPatternWithName'