Skip to content

Commit

Permalink
add permissions array validation rule on store method
Browse files Browse the repository at this point in the history
  • Loading branch information
phyothiha committed Dec 9, 2024
1 parent 28ed27e commit 51a27bd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ public function store()
'name' => 'required',
'permission_type' => 'required',
'description' => 'required',
'permissions' => 'required_unless:permission_type,all',
]);

Event::dispatch('user.role.create.before');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ class="primary-button"
</option>
</x-admin::form.control-group.control>
<x-admin::form.control-group.error control-name="permission_type" />
<x-admin::form.control-group.error control-name="permissions" />
</x-admin::form.control-group>
<div v-if="permission_type == 'custom'">
Expand Down

0 comments on commit 51a27bd

Please sign in to comment.