mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-12 16:44:08 -08:00
Merge remote-tracking branch 'origin/develop'
Some checks are pending
CodeQL Security Scan / CodeQL Security Scan (javascript) (push) Waiting to run
Codacy Security Scan / Codacy Security Scan (push) Waiting to run
Docker images (Alpine) / docker (push) Waiting to run
Docker images / docker (push) Waiting to run
Tests in MySQL / PHP ${{ matrix.php-version }} (8.1) (push) Waiting to run
Tests in MySQL / PHP ${{ matrix.php-version }} (8.2) (push) Waiting to run
Tests in MySQL / PHP ${{ matrix.php-version }} (8.3) (push) Waiting to run
Tests in SQLite / PHP ${{ matrix.php-version }} (8.1.1) (push) Waiting to run
Some checks are pending
CodeQL Security Scan / CodeQL Security Scan (javascript) (push) Waiting to run
Codacy Security Scan / Codacy Security Scan (push) Waiting to run
Docker images (Alpine) / docker (push) Waiting to run
Docker images / docker (push) Waiting to run
Tests in MySQL / PHP ${{ matrix.php-version }} (8.1) (push) Waiting to run
Tests in MySQL / PHP ${{ matrix.php-version }} (8.2) (push) Waiting to run
Tests in MySQL / PHP ${{ matrix.php-version }} (8.3) (push) Waiting to run
Tests in SQLite / PHP ${{ matrix.php-version }} (8.1.1) (push) Waiting to run
This commit is contained in:
commit
ec5731353a
|
@ -29,8 +29,8 @@ class AssetModel extends SnipeModel
|
||||||
|
|
||||||
// Declare the rules for the model validation
|
// Declare the rules for the model validation
|
||||||
protected $rules = [
|
protected $rules = [
|
||||||
'name' => 'required|min:1|max:255',
|
'name' => 'string|required|min:1|max:255|unique:models,name',
|
||||||
'model_number' => 'max:255|nullable',
|
'model_number' => 'string|max:255|nullable',
|
||||||
'min_amt' => 'integer|min:0|nullable',
|
'min_amt' => 'integer|min:0|nullable',
|
||||||
'category_id' => 'required|integer|exists:categories,id',
|
'category_id' => 'required|integer|exists:categories,id',
|
||||||
'manufacturer_id' => 'integer|exists:manufacturers,id|nullable',
|
'manufacturer_id' => 'integer|exists:manufacturers,id|nullable',
|
||||||
|
|
Loading…
Reference in a new issue