Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Azure Function Http Trigger validating body data

Is there a way currently to validate objects in Azure functions using something similar to Data Annotations and Model State in the MVC framework? Or what is the standard approach to data validation and error response in Functions?

like image 650
tokyo0709 Avatar asked Oct 20 '17 21:10

tokyo0709


Video Answer


1 Answers

This mechanism doesn't exist today, so you need to handle this validation yourself, but this would be a great feature.

We have an issue tracking this here: https://github.com/Azure/azure-webjobs-sdk/issues/1199, please feel free to comment and upvote!

like image 68
Fabio Cavalcante Avatar answered Sep 23 '22 07:09

Fabio Cavalcante