class-validator#IsUrl TypeScript Examples

The following examples show how to use class-validator#IsUrl. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: classes.ts    From epicgames-freegames-node with MIT License 6 votes vote down vote up
/**
   * The base URL of your Apprise instance
   * @example http://localhost:8000
   * @env APPRISE_API
   */
  @IsUrl({
    require_tld: false,
  })
  apiUrl: string;
Example #2
Source File: user.inputs.ts    From convoychat with GNU General Public License v3.0 6 votes vote down vote up
@Field({ nullable: true })
  @Length(5, 100)
  @IsUrl(
    {
      disallow_auth: true,
      allow_protocol_relative_urls: false,
    },
    { message: "Invalid website URL" }
  )
  public website?: string;
Example #3
Source File: classes.ts    From epicgames-freegames-node with MIT License 6 votes vote down vote up
/**
   * Deprecated, use {@link WebPortalConfig.baseUrl|`webPortalConfig.baseUrl`}
   * @deprecated
   */
  @IsOptional()
  @IsUrl({
    require_tld: false,
  })
  baseUrl?: string;
Example #4
Source File: event-metadata.dto.ts    From nestjs-geteventstore with MIT License 6 votes vote down vote up
/**
   * Identifier of the context in which an event happened, event source
   * An absolute URI is RECOMMENDED.
   * @example http://api-live.net/order/create
   * @example /order/create
   */
  @IsUrl({
    require_host: false,
    require_protocol: false,
    require_tld: false,
    allow_protocol_relative_urls: true,
  })
  source: string;
Example #5
Source File: classes.ts    From epicgames-freegames-node with MIT License 5 votes vote down vote up
/**
   * The outgoing SMTP host name
   * @example smtp.gmail.com
   * @env SMTP_HOST
   */
  @IsUrl({ require_tld: false })
  smtpHost: string;
Example #6
Source File: create-course.dto.ts    From edu-server with MIT License 5 votes vote down vote up
/**
   * The link/URL of the course
   * @example 'https://codeforcause.org/courses'
   */
  @IsUrl()
  @IsNotEmpty()
  courseThumbnail: string;
Example #7
Source File: acct-verification.dto.ts    From codeclannigeria-backend with MIT License 5 votes vote down vote up
@IsUrl()
  clientBaseUrl: string;
Example #8
Source File: create-assignment.dto.ts    From edu-server with MIT License 5 votes vote down vote up
/**
   * The assignment link
   * @example 'https://codeforcause.org/courses/assignments/1'
   */
  @IsNotEmpty()
  @IsUrl()
  assignmentLink: string;
Example #9
Source File: data_source.ts    From Deep-Lynx with MIT License 5 votes vote down vote up
@IsUrl()
    endpoint?: string;
Example #10
Source File: Vulnerability.ts    From bulwark with MIT License 5 votes vote down vote up
@Column()
  @IsUrl()
  cvssUrl: string;
Example #11
Source File: dbms-plugin.model.ts    From relate with GNU General Public License v3.0 5 votes vote down vote up
// eslint-disable-next-line camelcase
    @IsUrl({require_tld: false})
    public downloadUrl!: string;
Example #12
Source File: data_source.ts    From Deep-Lynx with MIT License 5 votes vote down vote up
@IsUrl()
    endpoint?: string;
Example #13
Source File: UpdateProfileCommand.ts    From test with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
@IsOptional()
  @IsUrl()
  @Transform(({ value }) => (value === '' ? null : value))
  website: string
Example #14
Source File: export.ts    From Deep-Lynx with MIT License 5 votes vote down vote up
@IsUrl()
    endpoint?: string;
Example #15
Source File: update-mentor.dto.ts    From edu-server with MIT License 5 votes vote down vote up
/**
   * photo url of the mentor
   * @example 'https://g.gle/mypic.jpeg'
   */
  @IsNotEmpty()
  @IsUrl()
  mentorPhoto: string;
Example #16
Source File: shared.dto.ts    From affinidi-core-sdk with Apache License 2.0 5 votes vote down vote up
// eslint-disable-next-line @typescript-eslint/naming-convention
  @IsUrl({ require_tld: false })
  @IsOptional()
  registryUrl?: string
Example #17
Source File: clusters.ts    From Discord-Bot-TypeScript-Template with MIT License 5 votes vote down vote up
@IsDefined()
    @IsUrl({ require_tld: false })
    url: string;
Example #18
Source File: event-metadata.dto.ts    From nestjs-geteventstore with MIT License 5 votes vote down vote up
/**
   * Identifies the schema that data adheres to.
   * Incompatible changes to the schema SHOULD
   * be reflected by a different URI
   */
  @IsOptional()
  @IsUrl()
  dataschema?: string;
Example #19
Source File: Types.ts    From ADR-Gateway with MIT License 5 votes vote down vote up
@IsUrl({require_tld:false}) // TODO change to https only/remove since this is default.
  token_endpoint!: string;
Example #20
Source File: shards.ts    From Discord-Bot-TypeScript-Template with MIT License 5 votes vote down vote up
@IsDefined()
    @IsUrl()
    url: string;
Example #21
Source File: shared.dto.ts    From affinidi-core-sdk with Apache License 2.0 5 votes vote down vote up
// eslint-disable-next-line @typescript-eslint/naming-convention
  @IsUrl({ require_tld: false })
  @IsOptional()
  issuerUrl?: string
Example #22
Source File: create-survey-point.dto.ts    From aqualink-app with MIT License 5 votes vote down vote up
@ApiProperty({ example: 'http://some-sample-url.com' })
  @IsOptional()
  @IsUrl()
  readonly imageUrl?: string;