This commit is contained in:
James Cole
2017-01-04 17:25:28 +01:00
parent ba957196da
commit 83f5f776a6
6 changed files with 19 additions and 7 deletions

View File

@@ -67,8 +67,8 @@ class BillFormRequest extends Request
$rules = [
'name' => $nameRule,
'match' => $matchRule,
'amount_min' => 'required|numeric|min:0.01',
'amount_max' => 'required|numeric|min:0.01',
'amount_min' => 'required|numeric|more:0',
'amount_max' => 'required|numeric|more:0',
'amount_currency_id_amount_min' => 'required|exists:transaction_currencies,id',
'amount_currency_id_amount_max' => 'required|exists:transaction_currencies,id',
'date' => 'required|date',

View File

@@ -94,7 +94,7 @@ class JournalFormRequest extends Request
'notes' => 'min:1,max:50000',
// and then transaction rules:
'description' => 'required|between:1,255',
'amount' => 'numeric|required|min:0.01',
'amount' => 'numeric|required|more:0',
'budget_id' => 'mustExist:budgets,id|belongsToUser:budgets,id',
'category' => 'between:1,255',
'source_account_id' => 'numeric|belongsToUser:accounts,id',

View File

@@ -63,7 +63,7 @@ class PiggyBankFormRequest extends Request
$rules = [
'name' => $nameRule,
'account_id' => 'required|belongsToUser:accounts',
'targetamount' => 'required|min:0.01',
'targetamount' => 'required|numeric|more:0',
'amount_currency_id_targetamount' => 'required|exists:transaction_currencies,id',
'startdate' => 'date',
'targetdate' => $targetDateRule,