ldc-web/app/Http/Requests/ServiceAccounts/StoreServiceAccountsRequest.php

35 lines
745 B
PHP
Raw Normal View History

<?php
2022-09-21 11:17:58 +00:00
namespace App\Http\Requests\ServiceAccounts;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Support\Facades\Auth;
2022-09-21 11:17:58 +00:00
class StoreServiceAccountsRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
2022-09-21 11:17:58 +00:00
* @return boolean
*/
public function authorize()
{
2022-09-21 11:17:58 +00:00
return Auth::check();
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
2022-09-21 11:17:58 +00:00
'name' => 'required|min:2|max:255',
'url' => 'required|min:2|max:255|url',
'account' => 'required|min:2|max:255',
'password' => 'required|max:255'
];
}
}