this post was submitted on 15 Jan 2025
18 points (100.0% liked)

.NET

1508 readers
8 users here now

Getting started

Useful resources

IDEs and code editors

Tools

Rules

Related communities

Wikipedia pages

founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] Cyno@programming.dev 2 points 2 days ago* (last edited 2 days ago) (1 children)

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 5 points 2 days ago (1 children)

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 1 points 2 days ago* (last edited 2 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