Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

What is the correct way of using Form Validation in Jira?

Hi everyone,

I am implementing a custom plugin with a configuration section in the admin page. The configuration includes a form I would like to validate using this:

https://aui.atlassian.com/aui/9.0/docs/form-validation.html

Here is what I have in my atlassian-plugin.xml

<web-resource key="eng-sla-calculator-resources" name="eng-sla-calculator Web Resources">

<dependency>com.atlassian.auiplugin:ajs</dependency>
<dependency>com.atlassian.auiplugin:aui-form-validation</dependency>

<transformation extension="js">
<transformer key="jsI18n"/>
</transformation>
<resource type="download" name="eng-sla-calculator-jira.css" location="/css/eng-sla-calculator-jira.css"/>
<resource type="download" name="eng-sla-calculator-jira.js" location="/js/eng-sla-calculator-jira.js"/>
<resource type="download" name="images/" location="/images"/>

<context>eng-sla-calculator</context>
</web-resource>

And here there is the beginning part of my .vm file:



$webResourceManager.requireResourcesForContext("eng-sla-calculator")
require('aui/form-validation')
$webResourceManager.requireResource("it.eng.esl.jira.plugins.eng-sla-calculator:eng-sla-calculator-resources")
$webResourceManager.requireResource("com.atlassian.auiplugin:aui-form-validation")


<html>

....

</html>

 

This is how I'm trying to validate my input fileds inside a form

 <input type="text" name="soglia_temporale1" class="text form-data" data-aui-validation-field data-aui-validation-required="required"/>

Nothing happens... at least I would expect the "*" to tell the user the field is mandatory.... what is the correct configuration to make the Form validation module work?

Thank you

Giorgia

 

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you