Fixed mac address regex

This commit is contained in:
snipe 2018-09-29 22:41:17 -07:00
parent 366c1f81cc
commit e5e8c068ea

View file

@ -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}$/',
]; ];
}); });