using "max" in nonlinear constraints

@odow, a follow-up question on splatting syntax. It seems that currently the splatting only works on the variable itself. However, in my problem, the variable is saved as a matrix, but the max is only taken over one column of the variable, e.g.

using JuMP, Ipopt
m = Model(with_optimizer(Ipopt.Optimizer))
M=5
N=2
@variable(m, x[1:M,1:N])
f(y...) = max(y...)
JuMP.register(m, :f, N, f, autodiff=true)
@NLobjective(m, Min, f(x[1,:]...)
optimize!(m)

But this is not allowed. I tried to make f act on x itself, but didn’t get it to work. Is there any elegant solution?