| 792 | } |
| 793 | |
| 794 | bool validateObjectName(std::string_view name, bool allowSpecialChars) noexcept { |
| 795 | if (!name.length()) { |
| 796 | return false; |
| 797 | } |
| 798 | return std::all_of(name.cbegin(), name.cend(), [allowSpecialChars](auto ch) { |
| 799 | return (std::isalnum(ch) || ch == '_' || ch == '-' || ch == '#' || (ch == '@' && allowSpecialChars)); |
| 800 | }); |
| 801 | } |
| 802 | |
| 803 | bool validateUserNsName(std::string_view name) noexcept { |
| 804 | if (!name.length()) { |
no test coverage detected