Change active bootstrap 5 tab on field error
Change active bootstrap 5 tab on field error
I have exactly the same problem as described here:
https://datatables.net/forums/discussion/59394/editor-field-validation-in-form-with-tabs
however with client side validation error I can't seem to act on them on the preSubmit event. How can I catch the field errors and act on them?
Answers
When you say you can't act on them, do you mean some DOM manipulation or something else? The thread you linked to was about seeing the fields when they enter the error state, not acting on them.
Allan
Sorry I meant when a field error is present (or occurs if that is possible) I want to read that error and place the text somewhere else or change the active tab/do som DOM manipulation. Because now with the bootstrap 5 tabs implemented in my editor template, if an error occurs on a different tab the editor won't show anything, only if you switch to the tab the validation error occured you can see it.
@allan
Nevermind I needed the postSubmit, so i could get the fielderrors from the serverside. please close.