azure-webjobs-sdk icon indicating copy to clipboard operation
azure-webjobs-sdk copied to clipboard

Consider Allow validation attributes on pocos

Open MikeStall opened this issue 7 years ago • 18 comments

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.

MikeStall avatar Jun 22 '17 16:06 MikeStall

Related SO post here: https://stackoverflow.com/questions/46164996/validating-azure-functions-crud-operations

mathewc avatar Sep 13 '17 00:09 mathewc

Found my way here from this as well: https://stackoverflow.com/questions/46857930/azure-function-http-trigger-validating-body-data

tokyo0709 avatar Oct 23 '17 14:10 tokyo0709

this feature would be great :+1:

jansoren avatar Nov 22 '17 06:11 jansoren

any update on this?

joeyeng avatar Mar 19 '18 22:03 joeyeng

Missing it badly..

ErAnwarAhmad avatar May 04 '18 17:05 ErAnwarAhmad

We really need this feature.

haiquan avatar Jul 13 '18 08:07 haiquan

Got a tip that Fluent Validation could work well with Azure Functions. Is there anyone who has experience with this?

jansoren avatar Jul 13 '18 08:07 jansoren

Any news on this topic?

margaretaNikolov avatar Aug 17 '18 11:08 margaretaNikolov

Any news on whats the way ahead here?

audipen avatar Aug 22 '18 14:08 audipen

We agree that this would be a nice feature but we have no immediate plans to work on this. That's the latest status.

paulbatum avatar Aug 23 '18 21:08 paulbatum

this would be a great feature... hope we don't need to wait so long to get it :)

CaioCavalcanti avatar Sep 06 '18 20:09 CaioCavalcanti

This would be a great feature to have 💯

zeezment avatar Oct 03 '18 09:10 zeezment

When we use this technology for real, everybody need this kind of stuff. No more "hello world" please ;)

inghak avatar Oct 24 '18 12:10 inghak

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.

joeyeng avatar Oct 24 '18 23:10 joeyeng

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/

tomfaltesek avatar Jun 27 '19 21:06 tomfaltesek

This is still needed 👍

snerte avatar Aug 11 '21 07:08 snerte

Has anyone found a package-less workaround for this nowadays?

jari-kuipers avatar Nov 25 '21 09:11 jari-kuipers

I would find this useful as well.

ctraftoncodes avatar May 06 '22 14:05 ctraftoncodes