How to set the order of verification messages?

We use the "XPages" (native) Error Messages control to show validation errors. It works. Validation is performed by setting the field as necessary and entering a field error message. Nothing special.

Now you need to set the error messages in the same order as in the form. Is it possible?

I suppose I can create a custom validator (Java) and do all the form validations there in a specific order (just tested the validation interface ... but haven't used id yet).

+5
source share
2 answers

There is an old (unresolved) argument: whether errors should appear next to the control that failed the test, on top of the form or next to the button that you clicked to submit. I try to place them next to the failed control and has one message next to the button: "Sorry, I could not process the input, help me and correct the fields that contain error messages next to them." Then the sequence is no longer a problem. If you want to be 100% sure that instead of a control control you can use separate controls next to each other.

In any case, it would be a pleasant exercise: let the control of the error message change the css of the failed control, so it becomes clearer what to look for.

0
source

, . , , , css. , , JS , , UL. , .

0

All Articles