gengteng / axum-valid

axum-valid is a library that provides data validation extractors for the Axum web framework. It integrates validator, garde and validify, three popular validation crates in the Rust ecosystem, to offer convenient validation and data handling extractors for Axum applications.
MIT License
100 stars 4 forks source link

using Modifed and Validate at the same time #15

Closed MrAliSalehi closed 9 months ago

MrAliSalehi commented 9 months ago

how could I do this: Validified<Modified<Json<T>>> ? it seems Modified does not validate the data and vice versa

gengteng commented 9 months ago

The way Validified works is to first modify the data and then validate the modified data, so it already covers the functionality of Modified. In other words, Validified inherently handles both the "modify" and "validate" phases. For details on the functionality of each extractor, please refer to the extractor list section in the README file. Combinations and nesting like Validified<Modified<E>> are not directly supported right now. If the provided information does not fully address your specific use case, please feel free to provide a minimal code example demonstrating your intended usage and expected behavior. That would help me better understand the context and see how I could improve the API design to support your scenario. Please let me know if this helps explain the current capabilities and limitations. I'm happy to discuss further if you have any other questions!

MrAliSalehi commented 9 months ago

thanks that worked