Fixed a bug in the form request that wouldn't accept fairly long names.

This commit is contained in:
James Cole 2015-04-05 21:12:54 +02:00
parent 59998573ee
commit 8601428c4c

View File

@ -32,11 +32,11 @@ class AccountFormRequest extends Request
$types = join(',', array_keys(Config::get('firefly.subTitlesByIdentifier')));
$ccPaymentTypes = join(',', array_keys(Config::get('firefly.ccTypes')));
$nameRule = 'required|between:1,100|uniqueAccountForUser';
$nameRule = 'required|min:1|uniqueAccountForUser';
$idRule = '';
if (Account::find(Input::get('id'))) {
$idRule = 'belongsToUser:accounts';
$nameRule = 'required|between:1,100|uniqueAccountForUser:' . Input::get('id');
$nameRule = 'required|min:1|uniqueAccountForUser:' . Input::get('id');
}
return [