We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 512ecce commit 2028872Copy full SHA for 2028872
bundles/org.openhab.ui/web/src/components/item/item-mixin.js
@@ -44,7 +44,7 @@ export default {
44
* @returns {string} The error message if the name is invalid, or an empty string if the name is valid.
45
*/
46
validateItemName (name) {
47
- if (!/^[A-Za-z][A-Za-z0-9_]*$/.test(name)) {
+ if (!/^[A-Za-z_][A-Za-z0-9_]*$/.test(name)) {
48
return 'Required. Must not start with a number. A-Z,a-z,0-9,_ only'
49
} else if (this.items && this.items.some(item => item.name === name)) {
50
return 'An Item with this name already exists'
0 commit comments