Looking for feedback on a library I built to auto-wire API validation errors to Blazor WASM form fields
Hey everyone! I recently got tired of writing repetitive code to catch server-side API errors and display them in the UI. To solve this, I built an SDK that automatically walks client-side model paths ( address.city , items[0].name ) and maps RFC 9457 (Problem Details) errors straight into native Blazor FieldIdentifier instances via a custom HttpClient . What it does Walks nested C# model graphs…
You have created a library to simplify the process of displaying API validation errors in a Blazor WebAssembly (WASM) UI. The SDK automatically maps RFC 9457 (Problem Details) errors to native Blazor FieldIdentifier instances, allowing you to focus on calling your APIs without worrying about wiring errors.
The library works by walking nested C# model graphs automatically using a lightweight path tokenizer. It resolves standard lists, arrays, and custom numeric indexers. To handle parameter collisions across binding sources, such as query vs. body parameters, it offers an opt-in [Disambiguate] attribute for your controllers.
The SDK integrates seamlessly with Blazor’s EditContext and ValidationMessageStore. It is compatible with reflection and can be extended for your specific needs. Custom error binding behavior can be achieved by implementing your own factory or adding more accessors to the DI container.
To use the library, you only need to ensure that your APIs respond with problem details objects when an error occurs and utilize the specialized HttpClient. The library is open-source, published on NuGet, and comes with comprehensive documentation. You can find it on GitHub: https://github.com/Mattia-Re/MRX-SDK and the documentation at https://mrx.mattiare.com.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.