Git Product home page Git Product logo

Comments (4)

justin-schroeder avatar justin-schroeder commented on June 20, 2024 1

This is fixed in 1.6.4 — thanks for the reproduction 💪

from formkit.

justin-schroeder avatar justin-schroeder commented on June 20, 2024

I was able to isolate this and reproduce it. It is a bug.

from formkit.

Stiropor avatar Stiropor commented on June 20, 2024

@justin-schroeder Somehow after this fix my validation stopped working:

  1. I have a custom validator, that makes the field required when status is 1
  2. when I click submit validator works. But when I change the status, it makes no difference, error stays
  3. if I then change the status to unpublished, it works ONLY if I enter something in title and then delete (so it triggers the validation). Somehow status stopped working due to changes in listeners change in the commit.

There are 2 groups with same name, I know, but for a reason (some fields are translatable and get transformed into groups so we can switch and show/hide them). This works perfectly fine for months, form value and all that. Well, so did this rule until 1.6.4 was done.

Is there ANY way I get that node.at actually reacting to status field change? Note that when there are 2 languages there are 2 fields with name status, each in it's own group, that's why the call for $root.translations.en.
I'd do it without groups but sadly we cannot name elements like translations.es.title and make it work as object, so this was the only option.

Reproduction: https://formkit.link/eade881392843ffc606cf62a1af24bb4

from formkit.

justin-schroeder avatar justin-schroeder commented on June 20, 2024

Hey! Unfortunately that validation rule was only working due to a bug in prior versions that caused rules to run more often than they should. The only reason this doesnt currently work is that there are 2 groups with the same name. Here it is working fine when they are grouped:

https://formkit.link/8c4094cc5c88ba4f880123891f9d17f8

I understand the rational behind why you need that, however groups by the same names just wont work. Alternatively you could directly assign nodes to a group by using the parent prop.

from formkit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.