Add validation on tab key

Avatar

Avatar
Validate 10
Level 2
chandran8596539
Level 2

Like

1 like

Total Posts

39 posts

Correct reply

0 solutions
Top badges earned
Validate 10
Validate 1
Boost 1
View profile

Avatar
Validate 10
Level 2
chandran8596539
Level 2

Like

1 like

Total Posts

39 posts

Correct reply

0 solutions
Top badges earned
Validate 10
Validate 1
Boost 1
View profile
chandran8596539
Level 2

05-02-2018

We have a requirement on tab key, is to trigger the empty validation rule if the field are empty. It should function like on blur event. I tried this by checking the required field checkbox. But that option is not solving tab key validation. Is there any OOB functionality on this ? or Do i need to write rules ?

  • [Click] to next field or [Tab] to next field will trigger data field rule validation.

Thanks in advance,

Regards,

Chandra

Replies

Avatar

Avatar
Validate 1
Level 7
Hemant_arora
Level 7

Likes

92 likes

Total Posts

290 posts

Correct reply

54 solutions
Top badges earned
Validate 1
Ignite 5
Ignite 3
Ignite 1
Give Back 50
View profile

Avatar
Validate 1
Level 7
Hemant_arora
Level 7

Likes

92 likes

Total Posts

290 posts

Correct reply

54 solutions
Top badges earned
Validate 1
Ignite 5
Ignite 3
Ignite 1
Give Back 50
View profile
Hemant_arora
Level 7

06-02-2018

try allowBlank = false; in case it doesnt work then, you definitely need to write a listener. Refer to the link https://helpx.adobe.com/experience-manager/6-3/sites/developing/using/reference-materials/widgets-ap...?

Avatar

Avatar
Boost 50
Level 5
James_R_Green
Level 5

Likes

52 likes

Total Posts

191 posts

Correct reply

47 solutions
Top badges earned
Boost 50
Validate 25
Validate 10
Validate 1
Boost 5
View profile

Avatar
Boost 50
Level 5
James_R_Green
Level 5

Likes

52 likes

Total Posts

191 posts

Correct reply

47 solutions
Top badges earned
Boost 50
Validate 25
Validate 10
Validate 1
Boost 5
View profile
James_R_Green
Level 5

06-02-2018

Hi,

Do you mean in an adaptive form?

If so you can do something like the following:

window.addEventListener("bridgeInitializeStart", function (evnt) {

   // get hold of the guideBridge object
   var gb = evnt.detail.guideBridge;

   //wait for the completion of adaptive forms
   gb.connect(function () {

   //this function will be called after adaptive form is initialized


   gb.on("elementFocusChanged", function (event, data) {

     // validate field

  });

  });

});