First version of routine #732

This commit is contained in:
James Cole
2017-08-04 15:46:52 +02:00
parent 1878b5287b
commit 5d10a19bfa
11 changed files with 165 additions and 197 deletions

View File

@@ -37,7 +37,7 @@ class ProfileFormRequest extends Request
{
return [
'current_password' => 'required',
'new_password' => 'required|confirmed',
'new_password' => 'required|confirmed|secure_password',
'new_password_confirmation' => 'required',
];
}

View File

@@ -0,0 +1,53 @@
<?php
/**
* UserRegistrationRequest.php
* Copyright (c) 2017 thegrumpydictator@gmail.com
* This software may be modified and distributed under the terms of the Creative Commons Attribution-ShareAlike 4.0 International License.
*
* See the LICENSE file for details.
*/
declare(strict_types=1);
namespace FireflyIII\Http\Requests;
/**
* Class UserRegistrationRequest
*
*
* @package FireflyIII\Http\Requests
*/
class UserRegistrationRequest extends Request
{
/**
* @return bool
*/
public function authorize()
{
// Only everybody
return true;
}
/**
* @return array
*/
public function getUserData(): array
{
return [
'email' => $this->string('email'),
'password' => $this->string('password'),
];
}
/**
* @return array
*/
public function rules()
{
return [
'email' => 'email|required',
'password' => 'confirmed|secure_password',
];
}
}