Laravel projects requirements for approval

Hi, I developed a new laravel project and the project soft rejected.
There are several minor cases that I should solve them such as:

  1. All JavaScript should be written with “use strict” mode on.
  2. Use .on() rather than .click(), .bind(), .hover(), .submit() etc…
  3. You must provide ALL unminified assets too.
  4. Use “Purifier” for validating data output.
    I want to know which files should be corrected exactly? Should I solve problems just in “blade” files and the related files (.JS, Sass, etc.) or I should solve these cases for all of the third-party packages used in the project.
    Should I solve these cases for both admin and user-side or solving for user-side is sufficient?
    If I have to change these cases for all of the third-party assets (e.g. packages, bootstrap, jQuery, etc) they will be lost after an update released. Users are able to download and update all packages using composer and our changes will be lost.
    Or for Purifier, we used it everywhere that the user allowed to insert html tags. Is it OK? Because we used jQuery data validation for each form and each input just accept the related data.
    Thank you.

Hi @rocketsoft,

The reviewer mentioned issues very clearly. You should to fix those:

  1. “use strict” code example:
(function ($) {
	"use strict";
  1. PROPER EVENT BINDING: Consider using the preferred .on() method rather than .click(), .bind(), .hover(), .load(), .ready(), etc.

code example:
$('#toggle_get_form').on("click", function(e) {

  1. Your assets files should not minified, all code should be unminified.
  2. You should validate all data before output/echo/render. you can check this:
    Validation - Laravel - The PHP Framework For Web Artisans

Also you can search google.

Thanks

1 Like

Hi, thank you for your reply but there is no problem with technical processes.
We are aware of them and will correct them but there are several doubts:
1- Should we change both admin and user side or user side is enough?
2- Should we also change and correct mentioned cases in third-party plugins like bootstrap and github packages? Because if the user update them, changes will be lost. The “vendor” folder has the same situation in laravel. If we change files in this folder, the user will be able to update packages using composer and changes will be lost. I think changing these cases for plugins and packages is not reasonable.

@mgscoder

you have to make changes in all of your own codes for both front end & back end (if exist).

@mgscoder Thank you.
I have checked all of the required cases asked by reviewer.
All of them will be done but there was a problem with one of cases.
Some of jQery codes like .click, .hover, etc depricated and changing these codes is reasonable but it is a problem with changing .submit. It is not depricated. What is the suggested alternative for using this code for submitting forms in Ajax? We didnt use “submit” event anywhere we used it just for submitting form using Ajax.
There is the same problem for .bind

I am surprised why you are not spent some times to search in google. example code for .submit:
$('#YOUR-FORM-ID').on('submit', function (e) {