func (s *SourceInfoProcessor)  getValidationParameter(funcDecl *ast.FuncDecl) *ast.Object {
	for _, field := range funcDecl.Type.Params.List {
		starExpr, ok := field.Type.(*ast.StarExpr)  
		if !ok {
			continue
		}
		selExpr, ok := starExpr.X.(*ast.SelectorExpr)  
		if !ok {
			continue
		}
		xIdent, ok := selExpr.X.(*ast.Ident)  
		if !ok {
			continue
		}
		if selExpr.Sel.Name == "Validation" && s.sourceProcessor.importMap[xIdent.Name] == model.RevelImportPath {
			return field.Names[0].Obj
		}
	}
	return nil
}
Check to see if there is a *revel.Validation as an argument.
package parser2
import (
	"github.com/revel/cmd/utils"
	"golang.org/x/tools/go/packages"
	"github.com/revel/cmd/model"
	"go/ast"
	"go/token"
	"strings"
	"path/filepath"
	"github.com/revel/cmd/logger"
)
type (
	SourceInfoProcessor struct {
		sourceProcessor *SourceProcessor
	}
)
func NewSourceInfoProcessor(sourceProcessor *SourceProcessor) *SourceInfoProcessor {
	return &SourceInfoProcessor{sourceProcessor:sourceProcessor}
}
func (s *SourceInfoProcessor) processPackage(p *packages.Package) (sourceInfo *model.SourceInfo) {
	sourceInfo = &model.SourceInfo{
		ValidationKeys: map[string]map[int]string{},
	}
	var (
		isController = strings.HasSuffix(p.PkgPath, "/controllers") ||
			strings.Contains(p.PkgPath, "/controllers/")
		isTest = strings.HasSuffix(p.PkgPath, "/tests") ||
			strings.Contains(p.PkgPath, "/tests/")
		methodMap = map[string][]*model.MethodSpec{}
	)
	localImportMap := map[string]string{}
	log := s.sourceProcessor.log.New("package", p.PkgPath)
	log.Info("Processing package")
	for _, tree := range p.Syntax {
		for _, decl := range tree.Decls {
			s.sourceProcessor.packageMap[p.PkgPath] = filepath.Dir(p.Fset.Position(decl.Pos()).Filename)
			if !s.addImport(decl, p, localImportMap, log) {
				continue
			}
			spec, found := s.getStructTypeDecl(decl, p.Fset)
			if found {
				if isController || isTest {
					controllerSpec := s.getControllerSpec(spec, p, localImportMap)
					sourceInfo.StructSpecs = append(sourceInfo.StructSpecs, controllerSpec)
				}
			} else {
				funcDecl, ok := decl.(*ast.FuncDecl)
				if !ok {
					continue
				}
				if isController &&
					funcDecl.Recv != nil &&  
					funcDecl.Name.IsExported() &&  
					funcDecl.Type.Results != nil && len(funcDecl.Type.Results.List) == 1 {
					if m, receiver := s.getControllerFunc(funcDecl, p, localImportMap); m != nil {
						methodMap[receiver] = append(methodMap[receiver], m)
						log.Info("Added method map to ", "receiver", receiver, "method", m.Name)
					}
				}
				if lineKeyMap := s.getValidation(funcDecl, p); len(lineKeyMap) > 1 {
					sourceInfo.ValidationKeys[p.PkgPath + "." + s.getFuncName(funcDecl)] = lineKeyMap
				}
				if funcDecl.Name.Name == "init" {
					sourceInfo.InitImportPaths = append(sourceInfo.InitImportPaths, p.PkgPath)
				}
			}
		}
	}
	for _, spec := range sourceInfo.StructSpecs {
		spec.MethodSpecs = methodMap[spec.StructName]
	}
	return
}
func (s *SourceInfoProcessor) getValidation(funcDecl *ast.FuncDecl, p *packages.Package) (map[int]string) {
	var (
		lineKeys = make(map[int]string)
		validationParam = s.getValidationParameter(funcDecl)
	)
	ast.Inspect(funcDecl.Body, func(node ast.Node) bool {
		callExpr, ok := node.(*ast.CallExpr)
		if !ok {
			return true
		}
		funcSelector, ok := callExpr.Fun.(*ast.SelectorExpr)
		if !ok {
			return true
		}
		switch x := funcSelector.X.(type) {
		case *ast.SelectorExpr:  
			if x.Sel.Name != "Validation" {
				return true
			}
		case *ast.Ident:  
			if validationParam == nil || x.Obj != validationParam {
				return true
			}
		default:
			return true
		}
		if len(callExpr.Args) == 0 {
			return true
		}
		key := callExpr.Args[0]
		switch expr := key.(type) {
		case *ast.BinaryExpr:
			key = expr.X
		case *ast.UnaryExpr:
			key = expr.X
		case *ast.BasicLit:
			return true
		}
		if typeExpr := model.NewTypeExprFromAst("", key); typeExpr.Valid {
			lineKeys[p.Fset.Position(callExpr.End()).Line] = typeExpr.TypeName("")
		} else {
			s.sourceProcessor.log.Error("Error: Failed to generate key for field validation. Make sure the field name is valid.", "file", p.PkgPath,
				"line", p.Fset.Position(callExpr.End()).Line, "function", funcDecl.Name.String())
		}
		return true
	})
	return lineKeys
}