Open xmlking opened 10 years ago
In Grails applications we get error messages as fallows:
wonder if you can make messageSeverityKey optional so that we can globally set Severity if there is no Severity field in server send message.
app.config(["growlProvider", "$httpProvider", function(growlProvider, $httpProvider) { growlProvider.messagesKey("errors"); growlProvider.messageTextKey("message"); $httpProvider.responseInterceptors.push(growlProvider.serverMessagesInterceptor); }]);
Grails error message
{"errors": [{"object":"com.cb.cmp.console.Address","field":"state","rejected-value":"2","message":"Property[state]ofclass[classcom.cb.cmp.console.Address]withvalue[2]doesnotfallwithinthevalidsizerangefrom[2]to[2]"}, {"object":"com.cb.cmp.console.Address","field":"zip","rejected-value":"q","message":"Property[zip]ofclass[classcom.cb.cmp.console.Address]withvalue[q]doesnotfallwithinthevalidsizerangefrom[5]to[5]"}, {"object":"com.cb.cmp.console.Address","field":"zip","rejected-value":"q","message":"Property[zip]ofclass[classcom.cb.cmp.console.Address]withvalue[q]doesnotpasscustomvalidation"}] }
In Grails applications we get error messages as fallows:
wonder if you can make messageSeverityKey optional so that we can globally set Severity if there is no Severity field in server send message.
Grails error message