fairybread
fairybread copied to clipboard
Expose validation rules via schema / field
Goals:
- Expose FluentValidation rules via schema
- Accessibility - support pulling validation copy from resource files globalization (i18n)
Stretch goals:
- Support/execute + expose DataAnnotation attributes
-
Needs investigation as we need to see if / how FluentValidation rules turn into metadata in the MVC integration and how we could repurpose that out of the schema. @jmercha suggested we could use / take inspiration from the FV ASP.NET Core adapters here
-
I think this is something that wouldn't be solved by FairyBread, but by an existing globalization technique for FV. Surely there's a solution out there that folks can plug in already. Needs research.
Stretch goal 1. As mentioned previously, keen to not support data annotations, I'd like to keep this library focused solely on FluentValidation, but if enough people ask I'm open to considering how we might do it. Maybe there's a benefit for people exposing annotated EF models directly as inputs, but I personally would never be doing that.