Closed tvld closed 1 year ago
Going to close it already. I realize that my whole idea to conditionally exclude a character with this does not work:
export const ImageBaseNameSchema = Conditional.Exclude(
Type.String({ maxLength: 100 }), // fails... my bad ;)
Type.Literal('.')
)
I will use regex instead to have a base file name without the extension, to force "my-image" and prevent "my-image.jpg":
Type.String({ pattern: '^([^.]+)$', maxLength: 100 })
Right now I use :
'''ts import { StringEnum } from '@feathersjs/typebox' import { Conditional } from '@sinclair/typebox/conditional' ''' Maybe it would be nice to stick to pattern?
Maybe convenient in
node_modules/@feathersjs/typebox/lib/index.d.ts
add: