{"push_id":1379426541,"size":1,"distinct_size":1,"ref":"refs/heads/laravel-5-2-wildcard-rules","head":"e4cd79bf26117123d5eb8cd8f642ace373730a65","before":"e4540a12c218023c7967eec3e5b968e14d9e6736","commits":[{"sha":"e4cd79bf26117123d5eb8cd8f642ace373730a65","author":{"name":"Derek MacDonald","email":"cc6e9ec78652bd12672857d7438629285516df8a@canadastays.com"},"message":"Support 0-indexed arrays for >= Laravel 5.2 validation wildcard rules\n\ne.g.,\n* ['items.*.name' => 'required'] will validate DOM selector\n   $('[name=\"items\\\\[\\\\]\\\\[name\\\\]\"]') for name=\"items[][name]\"\n* ['item_name.*'] will validate DOM selector\n   $('[name=\"item_name\\\\[\\\\]\"]') for name=\"items_name[]\"\n\nLaravel 5.2's Validator::make() immediately strips wildcard rules so they\nmust be tracked separately in the DelegatedValidator class.\n\nUnfortunately named associative array keys are not supported in\nJavaScript as:\n\n* jQuery Validation plugin requires exact form name=\"\" attribute values\n   when defining rules and custom messages.\n* Best guess attempts to apply rules to name=\"\" attributes on the\n   page are made redundant by dynamically-added table rows that are\n   the typical use case of wildcard rules.\n   * e.g., For PHP rule  'items.*.name', this jQuery selector could guess\n      a named key <input name=\"items[495][name]\">:\n\n      $('[name^=\"items\\\\[\"][name$=\"\\\\]\\\\[name\\\\]\"]').map(function (i, el) {\n          return el.name;\n      });\n   * This could obviously return false-positive DOM nodes to include in\n      form validation. e.g., name=\"[items][][nested][name]\"\n   * New DOM <input>, <textarea>, or <select> inserted to the DOM\n      tree will not be included for form validation.\n   * The default Bootstrap view would have to be refactored to support\n      such a callback.","distinct":true,"url":"https://api.github.com/repos/derekmd/laravel-jsvalidation/commits/e4cd79bf26117123d5eb8cd8f642ace373730a65"}]}
{"actor":{"display_login":"derekmd"}}