Giter VIP home page Giter VIP logo

Comments (7)

ryanb avatar ryanb commented on July 29, 2024

Thanks for reporting this, I don't know when I will be able to investigate this issue, but it would be nice to get it fixed. Please keep me updated on your progress.

from nested_form.

jeroenj avatar jeroenj commented on July 29, 2024

After some debugging I found out why it wasn't working.

nested_form uses it's own form builder (obviously) being NestedForm::Builder. client_side_validations defines some js code for each form builder it supports (being ActionView::Helpers::FormBuilder, SimpleForm::FormBuilder and Formtastic::SemanticFormBuilder for now)

Copying the contents of the ActionView form builder to a new NestedForm::Builder form builder in the rails.validations.js fixes the issues. As far as I can see there is almost no difference between ActionView's and NestedForm's form builders.

from nested_form.

jeroenj avatar jeroenj commented on July 29, 2024

I've opened a ticket in client_side_validations's issues: DavyJonesLocker/client_side_validations#71

from nested_form.

ryanb avatar ryanb commented on July 29, 2024

Closing this because issue #12 will solve this problem. Just need to get around to adding it.

from nested_form.

eostrom avatar eostrom commented on July 29, 2024

Issue #12 will solve the immediate problem (client_side_validations doesn't recognize NestedForm::Builder), but CSV will still raise errors when trying to validate an added form element. I have what I think is a good design for fixing this, but I think it requires adding two parameters to the fieldAdded event: the newly added field, and the blueprint it was copied from. Does this sound reasonable? Or is there another way I can get at that information?

(There may also be issues with CSV trying to validate removed form elements - I haven't checked.)

from nested_form.

eostrom avatar eostrom commented on July 29, 2024

... I see that the new field parameter has already been added. I just need to get at the blueprint field it was copied from, so I can copy the associated validators.

from nested_form.

taavo avatar taavo commented on July 29, 2024

https://github.com/ryanb/nested_form/wiki/Integrating-with-client_side_validations

from nested_form.

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.