invoiceninja/app/Http/Requests/ClientPortal/RegisterRequest.php
Benjamin Beganović 41c76e55bc client register wip
2020-05-28 17:39:38 +02:00

34 lines
746 B
PHP

<?php
namespace App\Http\Requests\ClientPortal;
use Illuminate\Foundation\Http\FormRequest;
class RegisterRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
// Place to double check if key is okay, do company allow direct registrations, etc..
return true;
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
'email' => ['required', 'string', 'email', 'max:255', 'unique:client_contacts'],
'password' => ['required', 'string', 'min:6', 'confirmed'],
];
}
}