LSheNNawY

Experience

1,730

0 Best Reply Awards

  • Member Since 1 Year Ago
  • 14 Lessons Completed
  • 0 Favorites

10th September, 2018

LSheNNawY left a reply on "PUT" Ajax Request 422 Error • 1 week ago

Thank you all, I could fix it.

the problem was that I had to set the (ajax method) to POST not PUT and add {{ method_field('PUT') }} to the form.

24th August, 2018

LSheNNawY left a reply on "PUT" Ajax Request 422 Error • 4 weeks ago

this really what i do

LSheNNawY left a reply on "PUT" Ajax Request 422 Error • 4 weeks ago

[]

LSheNNawY left a reply on "PUT" Ajax Request 422 Error • 4 weeks ago

it's a standalone file and I force-refreshing the browser.

LSheNNawY left a reply on "PUT" Ajax Request 422 Error • 4 weeks ago

I did but no change

LSheNNawY left a reply on "PUT" Ajax Request 422 Error • 4 weeks ago

I've used serialize() method and not working too.

and this is all info.

General:
Request URL: http://lara-vue-ecom.test/admin/countries/saveCountry
Request Method: PUT
Status Code: 422 Unprocessable Entity
Remote Address: 127.0.0.1:80
Referrer Policy: no-referrer-when-downgrade


Responce Headers:
Cache-Control: no-cache, private
Connection: Keep-Alive
Content-Length: 239
Content-Type: application/json
Date: Fri, 24 Aug 2018 17:19:37 GMT
Keep-Alive: timeout=5, max=100
Server: Apache/2.4.29 (Ubuntu)
Set-Cookie: XSRF-TOKEN=eyJpdiI6Ik1QeFRkcE4zNjE3aUJqN1RITVVWVkE9PSIsInZhbHVlIjoiajM4dWR2bjN0emQ0ckNIY0ZpaEpHRUx3UDMrVElOa2QyQTN0ZEd5NkM0NnNTOGt5SmpObFpyUlVUTlNJZEk1cSIsIm1hYyI6IjkwOTNmNjNmZGJlMzk3MzIxODdjOGViMmE3NzM4MjVlY2Q1Y2E0ZDFiMjNiYjhiYzNjOGRhMDYxODIxNDc5OGEifQ%3D%3D; expires=Fri, 24-Aug-2018 19:19:37 GMT; Max-Age=7200; path=/
Set-Cookie: ecommerce_session=eyJpdiI6Ino2MjZYMUpYaTE3dHlzNGgwQnlDWnc9PSIsInZhbHVlIjoia0lOZW5IXC9TM0lcL3JCWnlnRFdHeUJ4bmo2b2xTNU1pdVFWNFhGMW1aMTJuVURMZmFZQmNBTnpLd2FscTdEZmFEIiwibWFjIjoiNTcxYWFhMWJlZjZhYjc1NTA0Yzk3NzkxY2NhNmIyZmE5ZjRmZDUyODIxMWQ1ODI4YjljMWU0NTM3Y2Y3N2ZlMiJ9; expires=Fri, 24-Aug-2018 19:19:37 GMT; Max-Age=7200; path=/; httponly


Request Headers:
Accept: */*
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.9,und;q=0.8,ar;q=0.7
Connection: keep-alive
Content-Length: 771
Content-Type: multipart/form-data; boundary=----WebKitFormBoundarypD8Tw4ZYyrufSHBd
Cookie: remember_admin_59ba36addc2b2f9401580f014c7f58ea4e30989d=eyJpdiI6ImZLMTI1S21ZYTJxd1F0c1owS29DV2c9PSIsInZhbHVlIjoicDhTU3poNkRocTVFaUhqNXFxYzhGTm1RbjYyZzFUdVdyK0Y5NzdidEpcLzdTV0Fzb3VnRTZsTEczZFVVQlNUNmVMamYyTlJncWh1dEV6V3hIaVBpY3FMTUJaS01NRHlQeXY3YU44MUdqcVlNV3JBUDVQWFU3U0N5NVlMb2NHdnhOc0J6ZkpYd2FWbERlRUNqTWoyZytGMG1BK0ZUKzc3U09hcXcyZldta2hyYz0iLCJtYWMiOiIzYjBjOGYyNzUyNzBlNjkyYzg3OTZlZWQ4OGNmZjUxZjJiMWM0NjQwZjJkM2Y4ZDQ4YzlhNmU3NmRmNzMwY2Y5In0%3D; XSRF-TOKEN=eyJpdiI6Im1mVjZwYkNSQXZUeTdyMm0wd0p2SVE9PSIsInZhbHVlIjoiNjc0WHo0ZXIxNGd0dHBvK0d5dlNcL05jZXY5aVVzXC9vKzdrYnZEaktBcnh4b25WZGZzK3hIUlJNOVlhNnpiZmExIiwibWFjIjoiNmNiNTYzNDgwMGI1Y2JiYmMyYTI2MTkwODIzZTgwODFhNTJiMmQ3MmE2OWNkNmZlMjQwMjZmOGJjNTdkZjBhYiJ9; ecommerce_session=eyJpdiI6ImViSFlFQUtuS08wMXlWendmUWYrQ0E9PSIsInZhbHVlIjoiQTJFU0RnVGY2Zml3OVVQamppc25YbXp0OWFiaGUraDRUd2R1WTJnV0hIaFlINFo4Q1dlRDRIaHl3NFBacFFcL1UiLCJtYWMiOiJhMjYxZTBiNmNiMWM5ZmJkMzlmYzVjN2JlNjFiOTVmZDE0NGY4YmRmMGYxMzU5YTZkNjcwZmU3ZDJlMzcxMTU5In0%3D

Host: lara-vue-ecom.test
Origin: http://lara-vue-ecom.test
Referer: http://lara-vue-ecom.test/admin/countries
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36
X-CSRF-Token: ppFEoEhG5aSCyWN9xjrxzQUEzylhVPoJmkiT3Xoo
X-Requested-With: XMLHttpRequest


Request Payload:
------WebKitFormBoundarypD8Tw4ZYyrufSHBd
Content-Disposition: form-data; name="name_en"

Spain
------WebKitFormBoundarypD8Tw4ZYyrufSHBd
Content-Disposition: form-data; name="name_ar"

اسبانيا
------WebKitFormBoundarypD8Tw4ZYyrufSHBd
Content-Disposition: form-data; name="code"

427
------WebKitFormBoundarypD8Tw4ZYyrufSHBd
Content-Disposition: form-data; name="symbol"

ES
------WebKitFormBoundarypD8Tw4ZYyrufSHBd
Content-Disposition: form-data; name="icon"; filename=""
Content-Type: application/octet-stream


------WebKitFormBoundarypD8Tw4ZYyrufSHBd
Content-Disposition: form-data; name="id"

4
------WebKitFormBoundarypD8Tw4ZYyrufSHBd
Content-Disposition: form-data; name="_method"

PUT
------WebKitFormBoundarypD8Tw4ZYyrufSHBd--

LSheNNawY left a reply on "PUT" Ajax Request 422 Error • 4 weeks ago

Countries request rules method

public function rules()
    {
        return [
            'name_en'   => 'required|regex:/^[a-zA-Z0-9 -]+/|min:3',
            'name_ar'   => 'required|regex:/^[\p{Arabic} -]+/u|min:3',
            'code'      => 'required|regex:/^[+0-9]/',
            'symbol'    => 'required|regex:/[a-zA-Z]+/|min:2',
            'icon'      => 'nullable|mimes:jpeg,jpg,bmp,png',
        ];
    }

LSheNNawY left a reply on "PUT" Ajax Request 422 Error • 4 weeks ago

I'm sorry, it's 422 I've edited it, ajaxUrl and ajaxMethod are just variables for the request url and request method ['put']

LSheNNawY started a new conversation "PUT" Ajax Request 442 Error • 4 weeks ago

I'm working on updating data with file upload using ajax and every time validation error says that all fields are required although the fields are not empty.

this is my js Code:

function save() {
    var data = new FormData(thisEle.closest('form'));
    $.ajax({
        url: ajaxUrl,
        method : ajaxMethod,
        data: data,
        processData: false,
        contentType: false,
    }).done(...).fail(....);
}

16th April, 2018

LSheNNawY left a reply on Validation Images • 5 months ago

Thanks you all, the problem was the spaces and the ico file only worked when i removed image rule @bobbybouwmann from icon attribute

LSheNNawY started a new conversation Validation Images • 5 months ago

Hi there, I'm trying to validate two files inputs one for a logo and the other for an icon, 1- added the enctype="multipart/form-data" to the form. 2- validation rules for these inputs are: [ 'logo' => 'image|mimes:jpeg, jpg, bmp, png', 'icon'=> 'image|mimes:ico', ] 3- when I try to upload a logo of the type png, it returns an error says "The Logo must be a file of type: jpeg, jpg, bmp, png." 4- when I try to upload an icon of the type ico it returns error says "The Icon must be an image."

LSheNNawY left a reply on Validation • 5 months ago

Thank you all, This worked for me "regex:/^[\p{Arabic}]+/u"

LSheNNawY left a reply on Validation • 5 months ago

@aurawindsurfing, thanks for the help but I've tried this before and I always got this error "preg_match(): Compilation failed: PCRE does not support \L, \l, \N{name}, \U, or \u at offset 3"

LSheNNawY started a new conversation Validation • 5 months ago

Hi there, how can I validate Arabic alphabets?

8th March, 2018

LSheNNawY left a reply on Valdiation Errors On Non Existing Inputs • 6 months ago

Thank you all, i was confused.

LSheNNawY started a new conversation Valdiation Errors On Non Existing Inputs • 6 months ago

hi there, I've created a request to make a custom validation for all forms i need, i made validation rules on all inputs that may exist like, 'name', 'email', 'password'

but when i make validation on a form that only contains an input for email it gives me errors for 'name', 'email', 'password' ,...,etc not only for the email input.

so, what's the problem.

28th August, 2017

LSheNNawY left a reply on Sentinel And Redirect()->with() Doesn't Display Flash Data • 1 year ago

I have this problem too, So, any help ??

Edit Your Profile
Update

Want to change your profile photo? We pull from gravatar.com.