mastouille.fr est l'un des nombreux serveurs Mastodon indépendants que vous pouvez utiliser pour participer au fédiverse.
Mastouille est une instance Mastodon durable, ouverte, et hébergée en France.

Administré par :

Statistiques du serveur :

639
comptes actifs

#webapi

0 message0 participant0 message aujourd’hui

Question for the .Net developers. When working with a service layer and WebAPI where do you put the user input *format* validation? controller/endpoint, service, or both?

I'm currently using fluentvalidation for format validation, validated at the WebAPI endpoint(s), and business logic validation within the service layer. Any serious formatting issues would cause a model exception, which seems fair as if invalid user data reaches the service layer I consider it exceptional