Hi Melanie,
as a temporary workaround you can also patch the underlying validation within the properties library. Probably the easiest solution if you can’t wait for a fix.
- Create a clone of the administration application:
c8ycli new administration administration
- Install patch-package as a dev dependency to your project:
npm install patch-package --save-dev
- Within your project update the template, which is used to create a new property:
\node_modules\@c8y\ng1-modules\core\ui\schemaForm\schemaPropertyEditor.html
. Specifically, modify the regular expression in line 12 to allow the_
character, e.g.ng-pattern="/^[A-Za-z0-9_]+$/"
- Run your app locally and test your changes.
- Create the corresponding patch
npx patch-package @c8y/ng1-modules
- Build the application and deploy it to the target tenant. In addition, add the postinstall script
patch-package
to install the patch after libraries have been installed in case the project is checked out by another developer. Of course also version control your patch.
Best regards
Christian