mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-11-13 13:37:09 -05:00
* 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
34 lines
669 B
PHP
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(),
|
|
];
|
|
}
|
|
} |