I am not convinced whether this is a good answer, but maybe helpful though. When I try:
FindFit[data, function[x], {a1}, x, FitRegularization -> (g[#] &)]
then I get the error message
FindFit::nrrfun: The regularization function g[#1]& evaluates to {0.} that is not a real number for a residual vector.
i.e. it evaluates to a List
. This brings me to the idea of doing it simply like so:
FindFit[data, function[x], {a1}, x, FitRegularization -> (First[g[#]] &)]
which MMA can obviously digest whithout problems. Does that make sense to you, can you use that approach with your real data?