mirror of
https://github.com/open-webui/open-webui
synced 2025-06-26 18:26:48 +00:00
fix: disable empty fields
This commit is contained in:
@@ -40,6 +40,13 @@
|
||||
<form
|
||||
class="flex flex-col w-full"
|
||||
on:submit|preventDefault={() => {
|
||||
if (name.trim() === '' || content.trim() === '') {
|
||||
toast.error($i18n.t('Please fill in all fields.'));
|
||||
name = '';
|
||||
content = '';
|
||||
return;
|
||||
}
|
||||
|
||||
dispatch('submit', {
|
||||
name,
|
||||
content
|
||||
|
||||
Reference in New Issue
Block a user