Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Feature Request: Array of Field Validation Errors #1726

delebash opened this Issue Oct 3, 2013 · 3 comments


None yet
3 participants

delebash commented Oct 3, 2013

Currently field validation errors throw OValidationException , this class just has a list of string messages that include the field name in the string message.

It would be nice instead to have an array of fieldName,className,errorMsg,errorCode, returned when an OValidationException this way you can consume it in your client application easier. Some client frameworks expect field validation errors to be returned from the server as fieldName, errorMsg, this way you can match the errorMsg with the field the user is trying to edit. For now you have to parse the error string and manually pull out the fieldName, className and errorMsg. This way you can build a custom errorMsg to be displayed on the client with fieldName and erroMsg

The errorCode would just be an easy way to match up custom errorCodes on the client, Example if you have a field is mandatory error, but you want to word the errorMsg different from what the server generates you can just make a map on your client matching server side errorCodes with the ones on your client to produce a custom worded errorMsg of the same type. ie ErrorCode 123 = mandatory ErrorCode 456 = Not Null ect.




lvca commented Oct 3, 2013

Hi Dan,
this is interesting. Would you like to fork our OrientDB project, apply this changes and send us a Pull Request?

delebash commented Oct 6, 2013

Sure, I will see what I can come up with

@lvca lvca modified the milestones: 2.0rc1, 2.2 Aug 28, 2014

@lvca lvca added the enhancement label Aug 28, 2014

@lvca lvca modified the milestones: 4.0, 2.2 Jul 10, 2015

@lvca lvca closed this Aug 3, 2017


lvca commented Aug 3, 2017

Not relevant anymore, closing it.

@lvca lvca added the wontfix label Aug 3, 2017

@lvca lvca modified the milestone: 4.0 Aug 5, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment