mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-12 22:37:28 -08:00
cleanup
This commit is contained in:
parent
25241542d2
commit
72c118a70f
|
@ -94,14 +94,13 @@ class CustomFieldset extends Model
|
||||||
|
|
||||||
array_push($rule, $field->attributes['format']);
|
array_push($rule, $field->attributes['format']);
|
||||||
$rules[$field->db_column_name()] = $rule;
|
$rules[$field->db_column_name()] = $rule;
|
||||||
// add not_array to rules for all fields
|
|
||||||
// temporary condition added to fix issue with model default updates in the gui
|
// add not_array to rules for all fields but checkboxes
|
||||||
if ($field->element != 'checkbox') {
|
if ($field->element != 'checkbox') {
|
||||||
$rules[$field->db_column_name()][] = 'not_array';
|
$rules[$field->db_column_name()][] = 'not_array';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($field->element == 'checkbox') {
|
if ($field->element == 'checkbox') {
|
||||||
//Log::alert($field->formatFieldValuesAsArray());
|
|
||||||
$values = $field->formatFieldValuesAsArray();
|
|
||||||
$rules[$field->db_column_name()][] = 'checkboxes';
|
$rules[$field->db_column_name()][] = 'checkboxes';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -314,7 +314,8 @@ class ValidationServiceProvider extends ServiceProvider
|
||||||
if(count($invalid) > 0) {
|
if(count($invalid) > 0) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
} else return true;
|
}
|
||||||
|
return true;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue