Java connector and form

When using the connector validation how do you return which field is bad?

All I see is being able to return

data.invalid();

with no other information.

There is an api, which allows to send validation details.

data.set_response_text(“some”)
or
data.set_response_attribute(“details”,“some”);

and on client side you can use onAfterUpdate event to access such details

data.set_response_attributeS(“details”,“some”);

But other than that it works great. Thanks.