chg: [permissionlimitation:validation] Added rule for max_occurence

pull/121/head
Sami Mokaddem 2022-12-08 15:35:02 +01:00
parent d1aa20c5fb
commit 409c116ad7
No known key found for this signature in database
GPG Key ID: 164C473F627A06FA
1 changed files with 1 additions and 0 deletions

View File

@ -22,6 +22,7 @@ class PermissionLimitationsTable extends AppTable
$validator
->notEmptyString('permission')
->notEmptyString('scope')
->naturalNumber('max_occurrence', __('That field can only hold non-negative values.'))
->requirePresence(['permission', 'scope', 'max_occurrence'], 'create');
return $validator;
}