I'd like to show errors after input on blur event, and a summary of all events on top of the form on submit.
Is it possible to do this and, if not, do you consider this could be planned for future release ?

Comments

attiks’s picture

You can always define a custom javascript callback and use the code to place the error messages where you want.

MarcElbichon’s picture

yes, but how to know which event is triggered and hwn can i call standard placement ?

attiks’s picture

Option 1

You can listen to clientsideValidationFormHasErrors to detect the submit, it passes the form, see http://drupalcode.org/project/clientside_validation.git/blob/refs/heads/...
If you need the validator as well, you probably have to patch line http://drupalcode.org/project/clientside_validation.git/blob/refs/heads/... and pass the validator

If you have to validator you can call validator.errorMap, it wil give you a list of all errors.

Option 2
Inside your custom callback you can do something like
error.appendTo(element);
error.appenTo($('#my-error-list'))

But you'll need a way to remove an error message after the input is valid

MarcElbichon’s picture

OK, will try your solutions.
Many thanks for your help.