Giter VIP home page Giter VIP logo

Comments (1)

bchavez avatar bchavez commented on May 17, 2024 1

Hello @thiagomajesk,

This sounds like a cool idea. Perhaps this could be done as a plugin or as an extension assembly Bogus.Plugin.FluentValidator. I think an extension assembly would be better at the moment so Bogus doesn't take a hard-dependency on FluentValidator.

Basically, to get something like this to work, you'll need to create some kind of AbstractValidator reader that translates FluentValidation's rules into Bogus rules. With FluentValildator's .With() and .Unless() and child/nested validators, I can imagine this reader-conversion could get very complex very fast; even with upcoming features like #8 and #74 that introduce "conventions".

I think it would take a decent amount of work to get your use-case operational. At the moment we won't have any immediate plans to do this. So, I'm going to close this issue for now.

If you feel strongly Bogus should have this feature, my suggestion would be to download the Bogus code, create a fork, or create a separate repo referencing Bogus and take a stab at implementing your feature. If you can come up with a rather complete solution, I'd be happy to take a look and possibly merge it into Bogus. I mean possibly because we'll have to weigh the benefits against the amount of complexity and maintainability that it may introduce. Additionally, if you find any pain points in extending Bogus, feel free to let me know; I'm pretty open to exposing Bogus' internal Faker<T> variables so you can extend it.

Thanks,
Brian

🔥 🌋 "We're building it up, to break it back down..."

from bogus.

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.