Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import { Exclude, Expose, Transform } from 'class-transformer';
- import { IsOptional } from 'class-validator';
- import { Like } from 'typeorm';
- @Exclude()
- export class SearchUsersDTO {
- @Expose()
- @IsOptional()
- @Transform((value) => Like(`%${value || ''}%`))
- public username: string;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement