question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot dynamically replace rules for entire form

See original GitHub issue

Even though it’s possible to replace rules for single field with field.set(‘rules’, {}) (as explained in #231), unfortunately running the same on form does not work.

If it’s by design then it’d be nice if an error message was thrown, instead of being a surprising no-op.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
d4rky-plcommented, Jun 20, 2017

All right, so: my use case was already solved with everything we’ve discussed before. The only issue is with array-based fields, everything else must’ve been a bug in my own code as I can’t seem to reproduce the issue anymore. I’m closing this for now, if I ever run into this problem again I’ll reopen.

0reactions
d4rky-plcommented, Jun 13, 2017

I’m on a weeklong vacation right now with no access to laptop or any other same dev environment so when I get back I’ll check but I’m pretty sure the last example didn’t work for entire form instance and just quietly failed without changing any rules. I will try to make a test case and see if I’m able to reproduce the original issue, sorry for not doing it in the first place 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

jQuery Validation: Changing Rules Dynamically - Stack Overflow
Ahh validation plugin, always so tricky :( First, I added id attributes to all the input boxes. Then, I made a change function...
Read more >
Form Dynamic Rules Override | Discussions
I have form rules that are conflicting with one another. I have a form that has "note lines" up to 4 total. In...
Read more >
Can't select 'Dynamic Forms' field in automation rule
Problem is that these 'Dynamic Fields' are not selectable when creating a new automation rule (copying field values, etc.)
Read more >
Three Ways to Dynamically Alter your Form Validation in ...
Dynamically Add a Control​​ We need to listen to optionB value changes and based on that we are add or remove the optionExtra...
Read more >
How to use Advanced Branching Logic to Dynamically ...
Once you have set and saved all your rules individually, Click Save on the Main Branching logic page. Save the form in order...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found