mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-11 22:07:29 -08:00
Fixed mac address regex
This commit is contained in:
parent
366c1f81cc
commit
e5e8c068ea
|
@ -13,6 +13,7 @@ $factory->state(App\Models\CustomField::class, 'imei', function ($faker) {
|
||||||
return [
|
return [
|
||||||
'name' => 'IMEI',
|
'name' => 'IMEI',
|
||||||
'help_text' => 'The IMEI number for this device.',
|
'help_text' => 'The IMEI number for this device.',
|
||||||
|
'format' => 'regex:/^[0-9]{15}$/',
|
||||||
];
|
];
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -41,7 +42,7 @@ $factory->state(App\Models\CustomField::class, 'cpu', function ($faker) {
|
||||||
$factory->state(App\Models\CustomField::class, 'mac-address', function ($faker) {
|
$factory->state(App\Models\CustomField::class, 'mac-address', function ($faker) {
|
||||||
return [
|
return [
|
||||||
'name' => 'MAC Address',
|
'name' => 'MAC Address',
|
||||||
'help_text' => 'regex:/^[0-9]{15}$/',
|
'format' => 'regex:/^([0-9a-fA-F]{2}[:-]){5}[0-9a-fA-F]{2}$/',
|
||||||
];
|
];
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue