Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Sep 16 14:29
    klas-s starred dry-rb/dry-initializer
  • Sep 16 07:54

    flash-gordon on release-1.5

    (compare)

  • Sep 16 05:03
    ewertoncodes starred dry-rb/dry-monads
  • Sep 15 22:41
    Samsinite opened #426
  • Sep 15 22:41
    Samsinite labeled #426
  • Sep 15 22:41
    Samsinite labeled #426
  • Sep 15 22:29
    lippytm starred dry-rb/dry-initializer
  • Sep 15 21:07
    andyw8 starred dry-rb/dry-auto_inject
  • Sep 15 19:37
    krdprog starred dry-rb/dry-initializer
  • Sep 15 19:37
    krdprog starred dry-rb/dry-types
  • Sep 14 15:34
    obahareth starred dry-rb/dry-system
  • Sep 14 08:00
    flash-gordon closed #91
  • Sep 14 08:00

    flash-gordon on master

    Fix typo The text mentions `.d… Merge pull request #91 from Spo… (compare)

  • Sep 14 07:58
    flash-gordon closed #425
  • Sep 14 07:58
    flash-gordon commented #425
  • Sep 13 21:18
    Quintasan edited #425
  • Sep 13 21:16
    Quintasan labeled #425
  • Sep 13 21:16
    Quintasan labeled #425
  • Sep 13 21:16
    Quintasan opened #425
  • Sep 13 20:35
    Spone review_requested #91
Piotr Solnica
@solnic
Class.new(Dry::Validation::Schema) do
  confirmation(:password)
end
cannot be more concise than this :joy:
Andy Holland
@AMHOL
:)
Piotr Solnica
@solnic
@AMHOL btw, uniqueness validation backed by a db should be very simple to achieve now
Andy Holland
@AMHOL
Nice, guess it will still need a global connection?
Piotr Solnica
@solnic
basically include App::Import(‘persistence.relations.users’) and def unique?(key, value); users.unique?(key => value);end
injected from container
Andy Holland
@AMHOL
Ahh OK, so we need to make a new predicate for each unique constraint, makes sense :+1:
Piotr Solnica
@solnic
@AMHOL well, it’s just a key rule
Andy Holland
@AMHOL
Could probably do some hocus pocus to make a generic one, but would probably be a bad idea
Piotr Solnica
@solnic
key(:email, &:unique?) will partially apply :email to the predicate
then value will be passed
so it’s gonna Just Work™
@AMHOL I will do the hocus pocus in rom-model for that
Andy Holland
@AMHOL
Yeah, I was more meaning say if you wanted a constraint on users#email and then another on credential#token for example
Piotr Solnica
@solnic
but a generic orm-agnostic/db-lib-agnostic predicate would be insane IMO
Andy Holland
@AMHOL
Ahh, cool
Yep, v.bad idea
Nice work BTW, looking awesome
Piotr Solnica
@solnic
@AMHOL thanks man, I’m close to cover all the use cases :)
but I’m gonna stop now, I feel confident enough that this is a good direction that more advanced stuff can be done later
Andy Holland
@AMHOL
Cool, I wish I could see a before and after on your million line validators lol
Piotr Solnica
@solnic
I gotta focus on rodakase and the book now
Andy Holland
@AMHOL
You written any of the book yet?
Piotr Solnica
@solnic
@AMHOL ain’t gonna happen, which is unfortunate, I’m leaving the project this month
Andy Holland
@AMHOL
Ahh, that's a shame
Piotr Solnica
@solnic
@AMHOL I’m about to start. first pages will be written on Friday
Andy Holland
@AMHOL
Nice :)
Piotr Solnica
@solnic
I need to come up with a rough plan first, but I have “intro” in my head so that’d be a start
I also need to figure out leanpub :)
90 stars on dry-validation btw :sparkles:
Andy Holland
@AMHOL
:D
Piotr Solnica
@solnic
it’s been a trending repo on github since last week, every day, I actually check it daily for whatever reason :joy:
Andy Holland
@AMHOL
lol to see if any of your repos are there ;)
Piotr Solnica
@solnic
that’s very likely
Andy Holland
@AMHOL
It is cool tho
Piotr Solnica
@solnic
morning
Hannes Nevalainen
@kwando
hola!
Piotr Solnica
@solnic
how would you call an object that is a result of running validation?
@AMHOL @timriley ^^ ???
hola @kwando :)
leaning towards Schema::Outcome
Hannes Nevalainen
@kwando
whats wrong with Schema::Result?
Piotr Solnica
@solnic
we have Validation::Result already
which is a result-per-rule
and we have Validation::Result::Set which is a result per rule-set
I actually need another concept, an array of result objects
no idea how to call it either
ok I know what to do
Tim Riley
@timriley
“Result” seems most natural, but since it’s already in use, “Outcome” isn’t too bad.