Questions tagged [request-validation]
79 questions
1
vote
1 answer
BindingResult is not showing errors even though there exist errors in the request body
I am to validate an incoming request body for field validation errors but there are no errors caught in the BindingResult.
I have tried using the @Valid annotations along with contraints annotations in the DTO but it isn't working.
Here is my…

jackfr0st
- 551
- 2
- 8
- 19
1
vote
0 answers
Doing something before synchronous postback
I have a rich text box that generates HTML markup in a textarea (i.e the JavaScript library called nicEdit). However, because the server has request validation and I am not allowed to disable it, I have to encode the HTML text before submitting it.…

Virus721
- 8,061
- 12
- 67
- 123
1
vote
1 answer
ASP.Net RequestValidation for json POST to match Form RequestValidation
I want to be able to do RequestValidation on content-type "application/json" in a consistent manner to Form validation ("application/x-www-form-urlencoded").
I've read…

Will
- 773
- 1
- 7
- 24
1
vote
1 answer
How to modify request validation?
I need to submit requests to my application as part of the URL, which contain quoted strings, such as
/search/"my query"
this is throwing an error, as outlined in the following question:
How to include quote characters as a route parameter? Getting…

DaveDev
- 41,155
- 72
- 223
- 385
1
vote
0 answers
How to handle HttpRequestValidationException in webapi?
I want to return error messages from a error handler I developed.
I've got this end case where URLs which contains invalid characters, are not reaching my handler, since I guess they are handled somehow earlier in the pipeline.
Example of such URL…

Y.S
- 1,860
- 3
- 17
- 30
1
vote
2 answers
Potentially dangerous Request.Form value only from IE8
I have a Facebook-style modern button control whose client side markup looks like:
1
vote
1 answer
What could trigger a validation exception in MVC5 framework pipeline
Not sure if this is the right place to ask this, but I struggle with one issue when posting HTML inside a string using MVC5. The question is: Once the controller has been hit by a request and a response is going to be sent, what else in ASP.NET MVC…

diegosasw
- 13,734
- 16
- 95
- 159
1
vote
1 answer
Laravel 5 error when add rules validation on Form Request: ReflectionException in Container.php line 776: Class guest does not exist
When I use Request validation in a Controller Method, this error is returned:
ReflectionException in Container.php line 776: Class guest does not exist
My request file is the follow:

leoalmar
- 226
- 5
- 14
1
vote
1 answer
How to validate Request.RawUrl in Application_BeginRequest event in Global.asax.cs file?
Some bots are requesting URLs like www.example.com/test-
they-are-angry... which is creating A potentially dangerous exception in my asp.net application. I need to validate the HttpContext.Current.Request.RawUrl in Application_BeginRequest…

user2338652
- 467
- 2
- 6
- 13
1
vote
1 answer
How do you step into and debug .NET request validation in MVC4
If this is possible, please could someone let me know how I can either set a breakpoint on request validation in .NET or view errors thrown by it?
The request validation is happening during an AJAX request from one of my views but I've not been able…

BenM
- 4,218
- 2
- 31
- 58
0
votes
1 answer
Cancel button that does not send form data
Inside an UpdatePanel I have two PlaceHolders which are never visible at the same time. In one PlaceHolder I let the user choose an article to edit and when an article is selected it is displayed in the other PlaceHolder. When this happens is set…

Thomas Johansson
- 583
- 2
- 6
- 15
0
votes
1 answer
Typescript error when validating a request object with Express Middleware
I am moving my app from js to ts and encountered the following problem:
In my app I use a middleware function to validate requests. It checks stuff like whether req.files.image exists, image type and image…

katrin_melody
- 3
- 3
0
votes
0 answers
What would be proper structure of RequestValidation plugin usage
In documentation and code samples of Ktor, regarding RequestValidation plugin (https://ktor.io/docs/request-validation.html) there are validators for different types but all defined on same place, within install(RequestValidation)…

lmiskovic
- 109
- 1
- 10
0
votes
2 answers
laravel Validate Request
For Examle I have Request Validation
'images.*' => 'mimes:jpg,jpeg|max:10240',
'images' => 'max:5',
It work In Create But , in update how I can check It , for example I already uploaded 4 image And In update I must add Only…

Timur
- 67
- 1
- 1
- 10
0
votes
2 answers
(Laravel) I want to store my data only if my "type_id" is a number between 0 ad 4
I have a form on my .blade that has a filed "type_id" and it must a number between 0 and 4
is it possible to create a multiple size? for example 'size:0 || size:1 || size:2 || size:3 || size 4' ???
that's my function store: (but the most important…

Matteo Cossu
- 3
- 1