Fixed mac address regex
This commit is contained in:
parent
366c1f81cc
commit
e5e8c068ea
1 changed files with 2 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue