• Cyno@programming.dev
    link
    fedilink
    arrow-up
    4
    arrow-down
    1
    ·
    edit-2
    9 days ago

    This whole thing is just a nice reminder to not go overboard and use a 3rd party library when it’s completely unnecessary. I never had a need to use sth like fluent validations when you can do pretty much the same thing by writing the validation method directly in your Dto, it’s a bit verbose but at least it also lets you have more control over the whole thing. Maybe I just never used it on a scale enough to justify the library but it seems completely superfluous, dunno

    • brian@programming.dev
      link
      fedilink
      arrow-up
      6
      ·
      9 days ago

      it’s not data validation like you’d put in a dto, it’s an assertion library for unit tests and such. It’s mostly just sugar that makes chaining together assertions more concise with better autocomplete you get from fluent apis. You can do the same thing with built in Assert but it’s nowhere near as nice to use

      • Cyno@programming.dev
        link
        fedilink
        arrow-up
        1
        ·
        edit-2
        8 days ago

        Ohh I mixed it up with FluentValidations, you are right. I never liked unit tests depending on libraries like that either tbf, vanilla xunit aint that bad either