request-validation

Disable request validation redirect in Laravel 5.4

谁都会走 提交于 2020-07-28 08:12:29
问题 So I'm trying to develop a rest API for an internal project, and I've got an issue where when the form request validation fails, it shows the @index response. So I have two routes; Route::get('/api/clients', 'ClientController@index'); Route::post('/api/clients', 'ClientController@store'); @index lists all clients, @store creates a new client and I've got a Form Request Validator on the @store method which checks a name is provided for the client. What I want is when the validator fails, it

Laravel 5.5 - Validate Multiple Form Request - at the same time

坚强是说给别人听的谎言 提交于 2020-01-03 02:22:07
问题 The question is already asked here for a previous version of laravel and not yet answered. I have a html form which is validated using three different Form Request Validations . I am able to do this. But, the problem is, the form validations take place one by one. Not at the same time. If the first form request throws a validation error the form is returned to the view so rest of the two forms doesn't evaluated, hence a proper validation error can't be displayed to the user. What I want is :

Laravel 5.5 - Validate Multiple Form Request - at the same time

怎甘沉沦 提交于 2020-01-03 02:22:06
问题 The question is already asked here for a previous version of laravel and not yet answered. I have a html form which is validated using three different Form Request Validations . I am able to do this. But, the problem is, the form validations take place one by one. Not at the same time. If the first form request throws a validation error the form is returned to the view so rest of the two forms doesn't evaluated, hence a proper validation error can't be displayed to the user. What I want is :

How to modify request validation?

妖精的绣舞 提交于 2019-12-23 03:05:05
问题 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 "Illegal characters in path" message I'd like to implement the suggestion by Scott Hanselman to alter the <httpRuntime requestPathInvalidCharacters="<,>,*,%,:,&,\" /> value to not include the quote character. But this doesn't appear to be

How do I get ONLY the validated data from a laravel FormRequest?

╄→гoц情女王★ 提交于 2019-12-22 08:34:06
问题 Lets say I have the following Custom Request: class PlanRequest extends FormRequest { // ... public function rules() { return [ 'name' => 'required|string|min:3|max:191', 'monthly_fee' => 'required|numeric|min:0', 'transaction_fee' => 'required|numeric|min:0', 'processing_fee' => 'required|numeric|min:0|max:100', 'annual_fee' => 'required|numeric|min:0', 'setup_fee' => 'required|numeric|min:0', 'organization_id' => 'exists:organizations,id', ]; } } When I access it from the controller, if I

AngularJS can't find XSRF-TOKEN cookie

二次信任 提交于 2019-12-19 04:13:20
问题 I'm using angular 1.0.4 with an ASP.NET MVC4 + Web API project. I'm trying to leverage angular's CSRF protection to no avail. I can see that I'm passing along a cookie named XSRF-TOKEN, but when angular tries to add the value as a header named X-XSRF-TOKEN in the response, the value appears as undefined. I tried following the advice here, but the HTML has yet to render, so no element is found. What might I be missing? Is the RequestVerificationToken cookie generated by ASP.NET MVC protected

Potentially dangerous Request.Form value only from IE8

眉间皱痕 提交于 2019-12-11 05:24:48
问题 I have a Facebook-style modern button control whose client side markup looks like: <button id="ctl00_uxBtn" value="ctl00$uxBtn" name="ctl00$uxBtn type="submit"> <div style="background-image: url("Icons/page_edit.png"); background-position: left center; background-repeat: no-repeat; line-height: 16px; padding: 3px 0pt 3px 22px;">Save Draft</div> </button> This button works fine with both IE and FF using the Visual Studio 2010 web server, but when I deploy the application to the server (Windows

Disabling ASP.NET Request Validation (for just one page) in a .NET 3.5 project hosted on IIS 7.5 with only .NET 4.0 installed

时间秒杀一切 提交于 2019-12-08 07:11:10
问题 I'm having a problem with request validation in ASP.NET webforms that I am fairly sure is down to me hosting a .NET 3.5 project on IIS 7.5 (Windows 7 - local development machine). Essentially I'm receiving a postback from an external site (that is entirely outside of my control) and receiving the following exception: A potentially dangerous Request.QueryString value was detected from the client (DATA="<IDP MSGTYPE="Authen..."). I've got this set in the page declaration: <%@ page language="C#"

Laravel 5.5 - Validate Multiple Form Request - at the same time

末鹿安然 提交于 2019-12-08 03:32:26
The question is already asked here for a previous version of laravel and not yet answered. I have a html form which is validated using three different Form Request Validations . I am able to do this. But, the problem is, the form validations take place one by one. Not at the same time. If the first form request throws a validation error the form is returned to the view so rest of the two forms doesn't evaluated, hence a proper validation error can't be displayed to the user. What I want is : validate the form with the three form validation requests rules at the same time . Controller: public

How do I disable request validation without setting RequestValidationMode to 2.0?

浪子不回头ぞ 提交于 2019-12-06 17:30:31
问题 We've just upgraded to ASP.NET 4.0, and found that requestValidation no longer works. The MSDN docs suggest we need to set requestValidationMode in web.config to 2.0: 4.0 (the default). The HttpRequest object internally sets a flag that indicates that request validation should be triggered whenever any HTTP request data is accessed. This guarantees that the request validation is triggered before data such as cookies and URLs are accessed during the request. The request validation settings of