mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-11 08:04:09 -08:00
Merge remote-tracking branch 'origin/develop'
This commit is contained in:
commit
bcce282ef9
|
@ -530,7 +530,6 @@ class AssetsController extends Controller
|
|||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @param \App\Http\Requests\ImageUploadRequest $request
|
||||
* @since [v4.0]
|
||||
* @return JsonResponse
|
||||
*/
|
||||
public function store(ImageUploadRequest $request)
|
||||
{
|
||||
|
|
|
@ -220,8 +220,6 @@ class Asset extends Depreciable
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
return parent::save($params);
|
||||
}
|
||||
|
||||
|
|
|
@ -92,6 +92,8 @@ class CustomFieldset extends Model
|
|||
|
||||
array_push($rule, $field->attributes['format']);
|
||||
$rules[$field->db_column_name()] = $rule;
|
||||
//add not_array to rules for all fields
|
||||
$rules[$field->db_column_name()][] = 'not_array';
|
||||
}
|
||||
|
||||
return $rules;
|
||||
|
|
|
@ -232,6 +232,10 @@ class ValidationServiceProvider extends ServiceProvider
|
|||
return true;
|
||||
}
|
||||
});
|
||||
|
||||
Validator::extend('not_array', function ($attribute, $value, $parameters, $validator) {
|
||||
return !is_array($value);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -95,6 +95,7 @@ return [
|
|||
'url' => 'The :attribute format is invalid.',
|
||||
'unique_undeleted' => 'The :attribute must be unique.',
|
||||
'non_circular' => 'The :attribute must not create a circular reference.',
|
||||
'not_array' => 'The :attribute field cannot be an array.',
|
||||
'disallow_same_pwd_as_user_fields' => 'Password cannot be the same as the username.',
|
||||
'letters' => 'Password must contain at least one letter.',
|
||||
'numbers' => 'Password must contain at least one number.',
|
||||
|
|
Loading…
Reference in a new issue