Database: mysql Ver 8.0.26 for macos11.3 on x86_64 (Homebrew)
Node Version: v14.17.4
NPM Version: 6.14.14
Yarn Version: 1.22.11
Hello,
When I created field Strapi constraints the Name to match the regex ([A-Za-z0-9_]), and I want to customize this regex so that can use colon character “:” in the name of fields (for example xmlns:S) by using this regex [\w]+:?[\w]+.
Where I can do this customization in the code? (I didn’t find something related to this in the documentation),
Or if there is another way to do this that would be amazing.
Hi there @Leena i think you can under advanced settings use a regex like this
^[a-zA-Z]+:[a-zA-Z]$
This will allow A-Z and a-z a : and then same a-z or A-Z I’m guessing you can replace the A-Z with numbers as well or add to it. This will match the whole line as well due the ^
Yeah for something like that you can’t use special characters, it needs to be a normalized string that follows that regex exactly. Any other format will be subject to errors or unexpected results.
Especially with how we construct the database and the internal API