mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Update library name validation to trim automatically
This commit is contained in:
parent
1c2d7ef918
commit
37d6f94c7c
2 changed files with 3 additions and 3 deletions
|
@ -42,10 +42,10 @@ function onAddLibrary(e) {
|
|||
isCreating = true;
|
||||
loading.show();
|
||||
const dlg = dom.parentWithClass(this, 'dlg-librarycreator');
|
||||
const name = dlg.querySelector('#txtValue').value;
|
||||
const name = dlg.querySelector('#txtValue').value.trim();
|
||||
let type = dlg.querySelector('#selectCollectionType').value;
|
||||
|
||||
if (name.length == 0 || name.trim().length !== name.length) {
|
||||
if (name.length === 0) {
|
||||
alert({
|
||||
text: globalize.translate('LibraryNameInvalid'),
|
||||
type: 'error'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue