engine icon indicating copy to clipboard operation
engine copied to clipboard

Input preprocessors

Open VojtaStanek opened this issue 3 years ago • 0 comments

If we have following schema:

export class Foo {
	@validation.assertPattern(/^#[0-9a-fA-F]{6}$/, 'Invalid color.')
	color = d.stringColumn().notNull()
}

We accept both #0094FF and #0094ff although they represent the same color. It would be nice, to allow both lowercase and uppercase variants to be submitted, but before storing them in database to normalize them (eg. lowercasing them).

VojtaStanek avatar Oct 27 '21 09:10 VojtaStanek