Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Aui-form-validation is not working using web resource key

LijinR February 13, 2018

Hi,

I want my forms to be validate using aui-form-validation.But I am not able to get the resource using the web resource key 'com.atlassian.auiplugin:aui-form-validation'.

I added this code in my vm file  

  #requireResource("com.atlassian.auiplugin:aui-form-validation").

But no effect.Did I miss anything?

Thanks in advance!

2 answers

0 votes
Daz
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 9, 2018

Hi @LijinR,

Did you end up finding a solution to your problem? I have some guesses as to what the problem might be, but I would need to know a few more things:

  • What product(s) are you building a plugin for?
  • Are you building a generic web-item, a web-panel, or a product-specific plugin point type?
  • What does the markup in your VM file look like -- can you provide a copy here?
  • What does your atlassian-plugin.xml file look like?

Once you have required the resource for form validation, depending on the version of AUI in use by the product, you may still need to initialise the feature by calling some javascript:

require('aui/form-validation')

 - Daz

0 votes
Alexey Matveev
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 13, 2018

I guess you need to include it as dependency in atlassian-plugin.xml under the web-resource tag. Something like this

<dependency>com.atlassian.auiplugin:aui-form-validation</dependency>
LijinR February 13, 2018

Hi @Alexey Matveev 

Thanks for your fast reply.

I added the dependency as a new web resource and add it in my vm file using require resource.But it still not working..

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events