Git Product home page Git Product logo

Comments (8)

hlship avatar hlship commented on August 24, 2024

The suggestion, to wrap the set as #(contains? #{1 2 3} %) does work.

from expound.

bhb avatar bhb commented on August 24, 2024

Related: #96 - this would allow users to add messages to existing spec messages (or overwrite them completely)

from expound.

jsa-aerial avatar jsa-aerial commented on August 24, 2024

If this could be made to work, it would be akin to a game changer. But even for something as simple as this:

(s/def ::id (s/or :idint ::id-int :idstg ::id-stg))
(ex/defmsg ::id "Should be either an integer or string of digits")
(ex/expound ::id "abc")

You just get the 'standard' error

Also, trying to use the 'fix' of #96 does not work either:

(ex/def ::id (s/or :idint ::id-int :idstg ::id-stg) "Should be either an integer or string of digits")
(ex/expound ::id "abc")

Just results in standard error.

So, should I give up on this?

from expound.

bhb avatar bhb commented on August 24, 2024

@jsa-aerial Thanks for using Expound! Unfortunately, you're correct: there isn't currently a way to add messages for compound specs like the example you posted above. It's on my radar, but probably won't take priority over some other areas (like spec.alpha2 compatibility) in the immediate future.

from expound.

jsa-aerial avatar jsa-aerial commented on August 24, 2024

OK, in any event, I actually am wanting 'end user' type messages. And that actually doesn't look to be in the scope of Expound anyway. So, may as well close this.

from expound.

bhb avatar bhb commented on August 24, 2024

That’s correct. Expound is focused on messages for developers. Perhaps Phrase would be a better fit here? https://github.com/alexanderkiel/phrase

from expound.

jsa-aerial avatar jsa-aerial commented on August 24, 2024

Yeah, I was looking at that last night before I replied here. It looks to be 'on the right track", but is totally opaque on how / where / why the dispatch mechanism is tied into your specs. It works for the simple toy examples given, but does not work at all for even a simple 'or' spec. Or at least it defeated me in getting it to work over the course of many permutations...

from expound.

bhb avatar bhb commented on August 24, 2024

This has been fixed as of 2c4019f

from expound.

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.