feature/Basic ConsumerKey Validation accepts UUID

This commit is contained in:
Marko Milić 2023-03-13 16:45:57 +01:00
parent 41b1a00819
commit a91acce206

View File

@ -756,7 +756,7 @@ object APIUtil extends MdcLoggable with CustomJsonFormats{
/** only A-Z, a-z, 0-9 and max length <= 512 */
def basicConsumerKeyValidation(value:String): String ={
val valueLength = value.length
val regex = """^([A-Za-z0-9]+)$""".r
val regex = """^([A-Za-z0-9-]+)$""".r
value match {
case regex(e) if(valueLength <= 512) => SILENCE_IS_GOLDEN
case regex(e) if(valueLength > 512) => ErrorMessages.ConsumerKeyIsToLong