firefly-iii/app/Http/Requests/NewUserFormRequest.php

41 lines
1014 B
PHP
Raw Normal View History

2015-06-01 11:13:54 -05:00
<?php
2016-02-05 05:08:25 -06:00
declare(strict_types = 1);
2015-06-01 11:13:54 -05:00
namespace FireflyIII\Http\Requests;
use Auth;
/**
* Class NewUserFormRequest
*
2016-02-04 00:28:39 -06:00
*
2015-06-01 11:13:54 -05:00
* @package FireflyIII\Http\Requests
*/
class NewUserFormRequest extends Request
{
/**
* @return bool
*/
public function authorize()
{
// Only allow logged in users
return Auth::check();
}
/**
* @return array
*/
public function rules()
{
return [
2015-12-26 01:06:34 -06:00
'bank_name' => 'required|between:1,200',
'bank_balance' => 'required|numeric',
'savings_balance' => 'numeric',
'credit_card_limit' => 'numeric',
'amount_currency_id_bank_balance' => 'exists:transaction_currencies,id',
'amount_currency_id_savings_balance' => 'exists:transaction_currencies,id',
'amount_currency_id_credit_card_limit' => 'exists:transaction_currencies,id',
2015-06-01 11:13:54 -05:00
];
}
}