Questions tagged [validation]

Tags for questions related to validating data.

13 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
2 votes
0 answers
295 views

Layers of validation for clean architecture in .Net Core web application

For a clean architecture where there is presentation layer (Javascript), web api layer, application/domain layer, infrastructure layer (EF Core ORM). Let's say it is an ATM system and the use case/...
user avatar
  • 29
1 vote
0 answers
2k views

design pattern/oop for large validation rule set

I'm writing this in node.js I have some data that needs validating before anything can be done with this. The data is validated in two different ways. I can use JSONSchema to validate the structure ...
user avatar
  • 323
1 vote
0 answers
164 views

MVC remote validation approach

I have a model, the model has 2 strings; foo and bar. foo is what it is, it will be one of x amount of possible values (it's not an enum, though). bar is entered by the user, so I want to validate ...
user avatar
1 vote
0 answers
41 views

Database Constraint from another table column

Let's consider the following objects : Article which can be of different types Equipment which point to an Article, some fields on equipment are only used for some types. I want to add constraint ...
user avatar
  • 3,456
1 vote
0 answers
226 views

How to consume inconsistent REST API with Mongo DB backend?

We are using a third party REST API and we are building one of the pages on our ASP.NET site around the data it delivers. We get results in JSON, and interact with it mostly using .NET MongoDB Driver. ...
user avatar
  • 181
0 votes
0 answers
19 views

Validation in both controller and my service classes?

I use the Laravel framework. I've got controllers, like CustomerActivityController, and I've got a service layer with services like CustomerActivityService. Say I want to create a new customer ...
user avatar
0 votes
1 answer
172 views

Should i specify that my methods "throws ConstraintViolationException" if the exception is actually thrown by a CDI interceptor?

Here is a sample method: @ApplicationScoped public class MyClass{ public void getUser(@Min(1) int id){ //get User logic } } I'm in a CDI environment with @ValidateOnExecution(type = ...
user avatar
  • 299
0 votes
0 answers
28 views

How to validate against changes to "illegal paths" in backend requests for complex data structures?

We are building a backoffice web application where people are making changes to an array of nested objects. Because of totally non relevant business reasons there are things that users cannot change ...
user avatar
  • 519
0 votes
0 answers
23 views

Design a multiple Asp.Net Core apps Solution

I am having an .Net Core Solution consisting of 3 Projects: The Site (Asp.Net Core MVC WebApp) The API (Asp.Net Core API) The "Common" library for shared functionality. The Common library ...
user avatar
  • 137
0 votes
0 answers
134 views

Call external API during validation (Rails)

I need to validate a value with data from an external API. The easiest way would be to add a validation rule in my model, call the external API and do my check. But it feels very dirty to call an API ...
user avatar
  • 1
0 votes
1 answer
125 views

Using the objects retrieved at the time of request validation

I hope the question title already answers the subject here. Lets say I have a number of ids that needs to be validated in a request. Example: request uri: [POST] /album/{album_id}/song Request ...
user avatar
-1 votes
1 answer
34 views

Client side validation with Jquery - MVC C# app

I am working on a very LEGACY MVC App using C# which is built from 2009. They dont have any client side validation at all. In other words, they dont use Validation mechanism provided by MVC framework ...
user avatar
-1 votes
3 answers
67 views

When and how to check input parameters

My SmsRecipientDetails class constructor accepts String value as recipient phone number. I would like to accept number with spaces: assertDoesNotThrow(() -> new SmsRecipientDetails("123456789 &...
user avatar
  • 289