Git Product home page Git Product logo

Comments (4)

etaque avatar etaque commented on May 26, 2024 1

(cc @amitaibu re: sequence usage)

from elm-form.

etaque avatar etaque commented on May 26, 2024

Hello,
It's easier now that we have sequence in validations (I just published 2.0.0).
I forked your gist, see checkboxList function and usage:
https://gist.github.com/etaque/9f8d50a4a9de0a105adcfaff0426d410#file-main-elm-L39-L55

This function should probably make his way into the package, but I'm not sure of the name: we already have list and sequence, things are getting confusing here.

from elm-form.

nmk avatar nmk commented on May 26, 2024

Ah, sequence in the new version is great! Thank you for looking into this. I agree that something like checkboxList should be a part of Form.Validate. I found a minor inconvenience though — if the keys are numeric, the selection does not work. I have updated the gist, have a look at the difference between colors and colorsWithNumericKeys.

This can be worked around by prefixing the field name with some constant string and adjusting the options, but it took me a while to figure out why it wasn't working.

I suspect numeric keys would be the norm if the things being selected over come from the backend.

from elm-form.

etaque avatar etaque commented on May 26, 2024

doc aspect tracked in #85

from elm-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.