1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-05 18:52:44 +01:00
invoiceninja/app/Http/Requests/ClientPortal/RegisterRequest.php

34 lines
746 B
PHP
Raw Normal View History

2020-05-28 17:39:38 +02:00
<?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'],
];
}
}