Browse Source

Model: Fix creation of new models

Do not mark 'filtered' columns as 'required' during validation,
as these are handled programmatically and not by the user.
master
Riyyi 3 years ago
parent
commit
2fb4481876
  1. 2
      app/model/Model.php

2
app/model/Model.php

@ -237,7 +237,7 @@ abstract class Model {
$required = false;
foreach ($this->rules as $rule) {
if ($rule[0] == $attribute && $rule[2] == 1) {
if ($rule[0] == $attribute && $rule[2] == 1 && $rule[3] == 0) {
$required = true;
break;
}

Loading…
Cancel
Save