Fix rule title.

This commit is contained in:
James Cole 2017-09-03 10:38:41 +02:00
parent c87d7458fc
commit b9f6119c68
No known key found for this signature in database
GPG Key ID: C16961E655E74B5E

View File

@ -65,9 +65,9 @@ class RuleFormRequest extends Request
// some actions require text:
$contextActions = join(',', config('firefly.rule-actions-text'));
$titleRule = 'required|between:1,100|uniqueObjectForUser:rule_groups,title';
$titleRule = 'required|between:1,100|uniqueObjectForUser:rules,title';
if (!is_null($repository->find(intval($this->get('id')))->id)) {
$titleRule = 'required|between:1,100|uniqueObjectForUser:rule_groups,title,' . intval($this->get('id'));
$titleRule = 'required|between:1,100|uniqueObjectForUser:rules,title,' . intval($this->get('id'));
}
$rules = [