Skip to content

Commit

Permalink
Update checkName.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
donavanbecker committed Jul 4, 2024
1 parent 9baa2ef commit 5e9ec8b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/util/checkName.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ export function checkName(displayName: string, name: string, value: Nullable<Cha
// Ensure the string starts and ends with a Unicode letter or number and allow any combination of letters, numbers, spaces, and apostrophes in the middle.
if (typeof value === "string" && !(new RegExp(/^[\p{L}\p{N}][\p{L}\p{N} ']*[\p{L}\p{N}]$/u)).test(value)) {
console.warn("HAP-NodeJS WARNING: The accessory '" + displayName + "' is getting published with the characteristic '" +
name + "'" + " not following HomeKit naming rules ('" + value + "')," + " with a pattern that ('" + pattern + "'). " +
name + "'" + " not following HomeKit naming rules ('" + value + "'). " +
"Use only alphanumeric, space, and apostrophe characters, start and end with an alphabetic or numeric character, and don't include emojis. " +
"This might prevent the accessory from being added to the Home App or leading to the accessory being unresponsive!");
}
}
}

0 comments on commit 5e9ec8b

Please sign in to comment.