36 lines
787 B
PHP
36 lines
787 B
PHP
<?php
|
|
|
|
namespace App\Http\Requests\API;
|
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
|
|
class RegisterRequest extends FormRequest
|
|
{
|
|
/**
|
|
* Determine if the user is authorized to make this request.
|
|
*
|
|
* @return bool
|
|
*/
|
|
public function authorize()
|
|
{
|
|
return true;
|
|
}
|
|
|
|
/**
|
|
* Get the validation rules that apply to the request.
|
|
*
|
|
* @return array<string, mixed>
|
|
*/
|
|
public function rules()
|
|
{
|
|
return [
|
|
'email' => 'required|email|unique:clients,email',
|
|
'password' => 'required|min:6',
|
|
'firstname' => 'required',
|
|
'lastname' => 'required',
|
|
'account_type' => 'required|in:company,business',
|
|
'country' => 'required|numeric|gt:0',
|
|
];
|
|
}
|
|
}
|