validate.go added