add message empty space not allowed
parent
7f817a2530
commit
702cb8f989
|
@ -572,15 +572,20 @@
|
||||||
inputLabel.textContent = value.length + ' von ' + maxLength + ' Zeichen verwendet';
|
inputLabel.textContent = value.length + ' von ' + maxLength + ' Zeichen verwendet';
|
||||||
|
|
||||||
// show error message no text specific
|
// show error message no text specific
|
||||||
if (value.length==0) {
|
if (value.length == 0) {
|
||||||
inputLabel.textContent = 'Bitte gib deinen Text ein';
|
inputLabel.textContent = 'Bitte gib deinen Text ein';
|
||||||
inputLabel.style.color = 'red';
|
inputLabel.style.color = 'red';
|
||||||
}
|
}
|
||||||
|
|
||||||
// show error message no emojis supported on this product variant
|
// show error message no emojis supported on this product variant
|
||||||
if (!emojisSupported && value.length > 0 && emojiRegex.test(value)) {
|
if (value.length > 0) {
|
||||||
inputLabel.textContent = 'Emojis werden bei diesem Typ nicht unterstützt. Bitte wechsle zu "Mit Hintergrund"';
|
if (!emojisSupported && emojiRegex.test(value)) {
|
||||||
inputLabel.style.color = 'red';
|
inputLabel.textContent = 'Emojis werden bei diesem Typ nicht unterstützt. Bitte wechsle zu "Mit Hintergrund"';
|
||||||
|
inputLabel.style.color = 'red';
|
||||||
|
} else if (!emojisSupported && text.indexOf(" ") === -1) {
|
||||||
|
inputLabel.textContent = 'Leerzeichen werden bei diesem Typ nicht unterstützt. Bitte wechsle zu "Mit Hintergrund"';
|
||||||
|
inputLabel.style.color = 'red';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue