pathvalidate icon indicating copy to clipboard operation
pathvalidate copied to clipboard

Choose sanitizing behavior of max_len

Open thombashi opened this issue 1 year ago • 1 comments

For now, sanitizing functions will trim the trailing string when the byte length exceeds the max_len. This behavior may not be preferable in some cases. Make it possible to choose the behavior of sanitizing when a byte length of the value exceeds max_len and change the default behavior.

Choices of behavior:

  • KEEP: do nothing
  • TRIM: trim the trailing string (current default)
  • TRIM_NAME: trim the trailing string except for the file extension
  • ERROR: raise an exception (new default)

thombashi avatar Sep 10 '22 15:09 thombashi