diff --git a/app/Http/Requests/SaveManufacturerRequest.php b/app/Http/Requests/SaveManufacturerRequest.php deleted file mode 100644 index dc96042e09..0000000000 --- a/app/Http/Requests/SaveManufacturerRequest.php +++ /dev/null @@ -1,41 +0,0 @@ -getRules(); - } - - /** - * Prepare the data for validation. - * - * @return void - */ - protected function prepareForValidation() - { - $this->merge([ - 'support_url' => $this->input('support_url'), - ]); - dd($this->all()); - } -} diff --git a/app/Models/Manufacturer.php b/app/Models/Manufacturer.php index 4d61e10429..6acbffe7cd 100755 --- a/app/Models/Manufacturer.php +++ b/app/Models/Manufacturer.php @@ -24,7 +24,7 @@ class Manufacturer extends SnipeModel 'name' => 'required|min:2|max:255|unique:manufacturers,name,NULL,id,deleted_at,NULL', 'url' => 'url|nullable', 'support_email' => 'email|nullable', - 'support_url' => ['regex:/.+:\/\/.+/','nullable'], + 'support_url' => ['starts_with:http://,https://,afp://,facetime://,file://,irc://','nullable'], ]; protected $hidden = ['user_id'];