From e5e8c068ead85d79ea1bc137b301d619746f1d8b Mon Sep 17 00:00:00 2001 From: snipe Date: Sat, 29 Sep 2018 22:41:17 -0700 Subject: [PATCH] Fixed mac address regex --- database/factories/CustomFieldsFactory.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/database/factories/CustomFieldsFactory.php b/database/factories/CustomFieldsFactory.php index 0ca8c62893..7840014fd0 100644 --- a/database/factories/CustomFieldsFactory.php +++ b/database/factories/CustomFieldsFactory.php @@ -13,6 +13,7 @@ $factory->state(App\Models\CustomField::class, 'imei', function ($faker) { return [ 'name' => 'IMEI', '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) { return [ 'name' => 'MAC Address', - 'help_text' => 'regex:/^[0-9]{15}$/', + 'format' => 'regex:/^([0-9a-fA-F]{2}[:-]){5}[0-9a-fA-F]{2}$/', ]; });