parameter inputs needed always lower case #4190
-
Hi, I would like to know is there any way I can tell in bicep that "Only accepts parameters which are lower case " ie a kind of input validation . or can I do an inline conversion to lower case please. I am trying to see an option without re-assigning the parameter input to a variable for this conversion. I saw the alternative approach which is assigning the parameter input to a variable and do the conversion using to lower() function but it makes a lot of repetition. as like minimum length and maximum length validations, can we set 'always lower as well? thanks @minlength(3) thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
There's no way to do this today. One question I would consider is do you want user deployments to fail if they are not lower cased? This is what would happen if we had a decorator to enforce this behavior. By converting it to lower case using |
Beta Was this translation helpful? Give feedback.
There's no way to do this today.
One question I would consider is do you want user deployments to fail if they are not lower cased? This is what would happen if we had a decorator to enforce this behavior. By converting it to lower case using
toLower()
you would not force the user to fail, but will still send the right result for the resource creation. It might make the code a bit more verbose, but it would be serving a purpose.