azure-webjobs-sdk
azure-webjobs-sdk copied to clipboard
Consider Allow validation attributes on pocos
This was a followup from https://github.com/Azure/azure-webjobs-sdk/issues/1169 We allow DataAnnotation attributes on binding attributes, consider allowing them on POCOs too. We JSON deserialize our pocos, so this may be a JSON.Net issue.
We now support these declarative validation attributes for binding authors. Might be interesting to support them for end users as well on their model types. E.g. I mark up my queue trigger poco, and our pipeline runs the validation and fails the invoke if the validations don't pass. It'd be a new validation stage in our pipeline.
Related SO post here: https://stackoverflow.com/questions/46164996/validating-azure-functions-crud-operations
Found my way here from this as well: https://stackoverflow.com/questions/46857930/azure-function-http-trigger-validating-body-data
this feature would be great :+1:
any update on this?
Missing it badly..
We really need this feature.
Got a tip that Fluent Validation could work well with Azure Functions. Is there anyone who has experience with this?
Any news on this topic?
Any news on whats the way ahead here?
We agree that this would be a nice feature but we have no immediate plans to work on this. That's the latest status.
this would be a great feature... hope we don't need to wait so long to get it :)
This would be a great feature to have 💯
When we use this technology for real, everybody need this kind of stuff. No more "hello world" please ;)
We're using fluent validation and I prefer that for anything but trivial validation. Function monkey even has built-in integration, but I haven't tried it yet.
Got a tip that Fluent Validation could work well with Azure Functions. Is there anyone who has experience with this?
Anyone who stumbles here in the future can check out the FluentValidation examples provided here: https://www.tomfaltesek.com/azure-functions-input-validation/
This is still needed 👍
Has anyone found a package-less workaround for this nowadays?
I would find this useful as well.