Hello, everyone.
I'm developing a Jira plugin for Jira DC 9.12.11 and using AUI 7.9.9 form validation for a AUI Dialog2. I'm using jQuery and JS to show and hide the dialog for different table rows within the same HTML so every time a dialog is shown the content is repopulated using Ajax for each row data by using:
AJS.dialog2("#my-view-dialog").show();
AJS.dialog2("#my-view-dialog").hide();
AJS.dialog2("#my-view-dialog").on("show", function() { //Logic here });
The form within the dialog is validating the inputs correctly by using the property data-aui-validation-field.
The issue I'm facing is that when having validation errors after closing the dialog using Cancel button and opening same dialog for whatever row in the table, the validation errors on fields are always shown, and by only triggering the submit and event aui-valid-submit is triggered the errors can be cleared.
AJS.$('#valid-submit-form').on('aui-valid-submit', function(event) { console.log('Data saved'); event.preventDefault(); });
Is there any way of resetting the validation to the original state so the errors can be cleared every time the dialog is shown? I've already tried the following without success, so there's no way to clear the validation state and errors are always shown:
Thank you in advance if you can provide me with any help on this AUI issue.
I was able to fix it by removing the attributes data-aui-notification-error, data-aui-validation-state and data-aui-validation-dateformat, and by setting them again accordingly.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.