docfix/to checkShortString

This commit is contained in:
simonredfern 2025-09-11 16:47:54 +02:00
parent d275ec71a2
commit d666afa031

View File

@ -900,7 +900,7 @@ object APIUtil extends MdcLoggable with CustomJsonFormats{
}
}
/** only A-Z, a-z, 0-9, -, _, ., and max length <= 16 */
/** only A-Z, a-z, 0-9, -, _, ., and max length <= 16. NOTE: This function requires at least ONE character (+ in the regx). If you want to accept zero characters use checkOptionalShortString. */
def checkShortString(value:String): String ={
val valueLength = value.length
val regex = """^([A-Za-z0-9\-._]+)$""".r