1

I have a dynamic input field in my form separated from the div tag. The active div input field is using display:block and the others inactive div is display:none. So, I searched a lot of possible solutions on how to validate the hidden div with the input fields. I found the validator ignore here. Here's the code

var validatorSettings = $.data($('form')[0], 'validator').settings;
validatorSettings.ignore = "";

The all hidden or display:none can validate also but when I try to put some valid form the result is always false. Here's the code:

if (!myForm.valid()) {
    console.log(myForm.valid());              
    return;
}

I trying to solve this issue almost 2 days. I can't solve this issue. Please help me. Thank you.

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Yas Smitch
  • 269
  • 2
  • 13

1 Answers1

0

I already answered my issue. Instead of using the display:none, I use visibility:hidden

Yas Smitch
  • 269
  • 2
  • 13