2022-01-17 12:58:24 +01:00
|
|
|
<?php
|
|
|
|
|
|
2022-06-15 12:07:34 +02:00
|
|
|
namespace App\Http\Requests\EmailAddresses;
|
2022-01-17 12:58:24 +01:00
|
|
|
|
|
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
|
|
|
use Illuminate\Support\Facades\Auth;
|
|
|
|
|
|
2022-06-15 12:07:34 +02:00
|
|
|
class StoreEmailAddressRequest extends FormRequest
|
2022-01-17 12:58:24 +01:00
|
|
|
{
|
|
|
|
|
/**
|
|
|
|
|
* Determine if the user is authorized to make this request.
|
|
|
|
|
*
|
2022-06-13 15:49:59 +02:00
|
|
|
* @return boolean
|
2022-01-17 12:58:24 +01:00
|
|
|
*/
|
|
|
|
|
public function authorize()
|
|
|
|
|
{
|
2022-06-15 12:07:34 +02:00
|
|
|
return Auth::check();
|
2022-01-17 12:58:24 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get the validation rules that apply to the request.
|
|
|
|
|
*
|
|
|
|
|
* @return array
|
|
|
|
|
*/
|
|
|
|
|
public function rules()
|
|
|
|
|
{
|
|
|
|
|
return [
|
2022-06-15 12:07:34 +02:00
|
|
|
'account' => 'required|min:2|max:255',
|
|
|
|
|
'password' => 'required|max:255',
|
|
|
|
|
'domain_name_id' => 'required|exists:domain_names,id'
|
2022-01-17 12:58:24 +01:00
|
|
|
];
|
|
|
|
|
}
|
|
|
|
|
}
|