Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sort validation messages based on fields of ActionBean #19

Open
iluvtr opened this issue Jul 15, 2015 · 3 comments
Open

Sort validation messages based on fields of ActionBean #19

iluvtr opened this issue Jul 15, 2015 · 3 comments

Comments

@iluvtr
Copy link

iluvtr commented Jul 15, 2015

Right now the validation messages are totally unsorted, sometimes random. I want to implement a way to sort the validation messages on the order of the fields (or methods) validated.

@vankeisb
Copy link
Member

Do you mean when using s:errors ? Or do you use ValidationErrors by API calls yourself to list and display the errors ?

@iluvtr
Copy link
Author

iluvtr commented Jul 30, 2017

Yes, for example when I want to give a JSON response with the validation errors, the messages are with random sort. Some time ago I code a hack to order the errors given the fields of the actionbean but it's something the framework should do.

@vankeisb
Copy link
Member

vankeisb commented Aug 1, 2017

Ok, what's the comparator ? Lexically on the field name ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants