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.
1 parent 674d7f4 commit fb41d11Copy full SHA for fb41d11
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