We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 859a9e1 + fb41d11 commit 511ffc3Copy full SHA for 511ffc3
src/common/email-field.ts
@@ -6,6 +6,6 @@ import { IsEmail } from './validators';
6
export const EmailField = (options: FieldOptions = {}) =>
7
applyDecorators(
8
Field(() => String, options),
9
- Transform(({ value }) => value?.toLowerCase()),
+ Transform(({ value }) => (value ? value.toLowerCase() : value)),
10
IsEmail(),
11
);
0 commit comments