I’m trying to implement bean validation with guidance from the docs, but it just doesn’t seem to be working as expected.
The validation is functioning properly - it errors out when it should. app.log
is showing the proper validation message. But the REST API does not return this message. The response shows, roughly, the following:
{
message: "",
response: {...}
}
The message is empty, whether I return a custom validation message or not.
I’m guessing that I missed a step, or something. Any ideas on what that could be?
The service method I am testing is as follows in the interface:
@Validated
@NotNull
ServiceResult<Pdetail> reactivateLineitem(
@NotNull
Pdetail lineitem,
Date startDate,
@Future(message = "Date must be in the future")
Date endDate,
BigDecimal amount
);
The code I’m using to call the service (the parameters include a date that is well within the past, so as to trigger the @Future constraint):
this.app.invokeService("muaipm_AccountService", "reactivateLineitem", this.params_reactivate, {
handleAs: "json"
}).then(function(response) {
...
}.bind(this)).catch(function(response) {
console.log(response)
console.log(response.message)
}.bind(this))
I am strictly using the Polymer front end, and haven’t touched the GUI.
Platform 6.6.4
What am I missing?