Git Product home page Git Product logo

Comments (2)

justin-schroeder avatar justin-schroeder commented on May 23, 2024

We can improve the DX here.

For context the intent of setErrors/clearErrors (when used deeply) — is for FormKit to automatically know which errors were applied via setErrors and only remove those ones when calling clearErrors. To do this errors are "signed" by the node that initially applied the error — in your case you are applying errors via the form, so the only node that can clearErrors is the form node.

If you use the form node to clear the errors on second_input you can do so (https://formkit.link/6679c9f9cec9e49a7d89a0166ce88c9e).

Alternatively — you can directly access the node store and filter out any error type messages:
https://formkit.link/fe8804af475ee1632c484d66786ffc01

from formkit.

justin-schroeder avatar justin-schroeder commented on May 23, 2024

ok @aegorx node.clearErrors() will always clear it’s own local errors even if they were set by a different node (in @next).

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.