mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-12 06:17:28 -08:00
Merge pull request #11737 from inietov/fixes/validation_error_still_without_required_rule
Fixed Validation error when empty default customfield values
This commit is contained in:
commit
96ec96ff7f
|
@ -471,7 +471,7 @@ class AssetModelsController extends Controller
|
|||
// (we are at model level, the rule still applies when creating a new asset using this model)
|
||||
$index = array_search('required', $validation);
|
||||
if ($index !== false){
|
||||
unset($validation[$index]);
|
||||
$validation[$index] = 'nullable';
|
||||
}
|
||||
$rules[$fieldset] = $validation;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue