Questions tagged [validation]
Tags for questions related to validating data.
282 questions
1 vote
2 answers
181 views
Proper place to validate JSON in an ASP.NET core app
I am building an ASP.NET Core 10.0 web-app using .NET's MVC model w/ Kestrel to serve it. The app will deploy on an Azure VM. It's a personal project, therefore, I decided to go with Cosmos DB as the ...
13 votes
13 answers
3k views
Should setters silently sanitize input — or should they just throw? [closed]
Suppose the code's inside some FullName class And suppose I want only capitalized name elements (let's ignore the fact that in some cultures, name elements may start with a lower-case letter) Should I ...
1 vote
3 answers
350 views
Where to handle Validation Errors in Business logic layer?
I'm currently designing a multi-layered application and am trying to figure out the best practice for error handling within the Business Logic Layer (BLL). Should I handle errors directly within the ...
3 votes
4 answers
2k views
Is validation part of presentation layer or business logic? [duplicate]
We're working on a new project (backend, API), following the "clean code" and "clean architecture" principles (described in Robert Martin's books), dividing our application into ...
1 vote
2 answers
280 views
Request validation on API proxy
I am creating an API proxy that acts as a bridge between our frontend application and an AWS opensearch server. This proxy has additional features such as retries and timeouts. One of the features I'm ...
10 votes
6 answers
6k views
How to ensure data consistency in system with multiple databases?
Let's say, in a rather big application suite with multiple more or less integrated products, data is stored across multiple databases. Some of them are SQL-ish DB clusters, some are MongoDB clusters. ...
0 votes
0 answers
70 views
How to group together common allowed descendants of a vertex in a tree data data structure?
I created an abstract class to represent a vertex in a tree structure. Later, a requirement was introduced where certain types of vertices are not allowed as descendants of certain other vertices. So ...
1 vote
1 answer
244 views
Wrapper class for min/max clamping and validation
I have a lot of classes that have numeric values that are configurable by the customer during runtime and should be clamped between a min and a maximum value. The value changes should also be logged. ...