mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-11 13:57:41 -08:00
More specific required check
This commit is contained in:
parent
a4b30279ee
commit
2e76620cf8
|
@ -47,11 +47,7 @@ class CustomFieldset extends Model
|
|||
|
||||
if (($field->field_encrypted!='1') ||
|
||||
(($field->field_encrypted =='1') && (Gate::allows('admin')) )) {
|
||||
if ($field->pivot->required) {
|
||||
$rule[]="required";
|
||||
} else {
|
||||
$rule[]="nullable";
|
||||
}
|
||||
$rule[] = ($field->pivot->required=='1') ? "required" : "nullable";
|
||||
}
|
||||
|
||||
array_push($rule, $field->attributes['format']);
|
||||
|
|
Loading…
Reference in a new issue