constraints => { myfield => { constraint => sub { return (checkField() ? 1 : 0) }, params => [qw(myfield, otherparam1, otherparam2)], }, ... }