invoiceninja/app/Http/Requests/SignupRequest.php
David Bomba 62e2444a2c
Sign Up Scaffolding (#2453)
* Fix js dependencies

* Breadcrumb implementation

* Test for UniqueEmailRule Validation

* reduce length of account_key to prevent key too long error

* Fixes for travis - reduce user email length

* Reduce all unique field lengths to 100 to prevent key overflow

* Fix for Bank Model

* Prevent a user from registering multiple account with one email address when using multiple databases
2018-10-17 23:26:27 +11:00

34 lines
669 B
PHP

<?php
namespace App\Http\Requests;
use App\Http\ValidationRules\UniqueUserRule;
use Illuminate\Support\Facades\Auth;
class SignupRequest extends Request
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return ! Auth::user();
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
//'email' => 'required|string|email|max:100',
'password' => 'required|string|min:6',
'email' => new UniqueUserRule(),
];
}
}