Chris Darroch [Atlassian], I'm trying to use validation (standard + custom) )for JIRA.Dialog but unable to make it work.
Validator is being registered with AJS.validator.register() but is not triggered.
Check example: https://bitbucket.org/gebsun/form-validation-jira/
More info in readme file
Community moderators have prevented the ability to post new answers.
@Trey Shugart Yes "form-validation" is added as dependency7 to JIRA module you can check example (non-working) https://bitbucket.org/gebsun/form-validation-jira/
@Chris "Daz" Darroch I'v prepared example please take a look: https://bitbucket.org/gebsun/form-validation-jira/. To be more specific "custom validation" is not working (I've added validator).
It seems that even validator is being registered with AJS.validator.register() but is not triggered.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If AUI's form validation is being used, you shouldn't have to re-initialise it at all. Simply having the form elements in the document is sufficient for them to validate. Are you experiencing an issue where form validation isn't working within a form that is used inside a dialog? If so: - Ensure AUI's form validation is actually on the page. I'm unsure as to whether or not that's the case from the provided examples. - Can you include exactly what isn't working and any errors you're getting if there are any from the JavaScript console?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry for non clear explanation. I'll try to explain a little bit:
I'm developing a plugin that has :
context for resource is
<context>atl.general</context>
resource as dependency loads for form validation
<dependency>com.atlassian.auiplugin:aui-form-validation</dependency>
This custom javascript basically: creates Dialog
JIRA.Dialogs.testDialog = new JIRA.FormDialog(...);
My problem is that form validation is instantiated when alt.general (Issue View) is loaded
After clicking on link (and Dialog is Created) form validation is not working (initialized in other context)
p.s. Some similar case as "Log Work" dialog on issue page (Dialog is created) but I want to user "form-validation" (loaded via dependency in web-resource or as AMD module) in that dialog.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Gebsun, what kind of form validation are you using? It is unclear to me. By `form/validation` do you mean the `aui/form-validation` AMD module? It is also unclear to me how Skate is relevant? Can you rewrite your question and perhaps offer some code example to clarify your question?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Community moderators have prevented the ability to post new answers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.