class-validator#Equals TypeScript Examples

The following examples show how to use class-validator#Equals. 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: event-metadata.dto.ts    From nestjs-geteventstore with MIT License 6 votes vote down vote up
// Cloud Event Metadata
  /**
   * Specification Version
   * @readonly
   * @see https://github.com/cloudevents/spec/blob/v1.0.1/spec.md#overview
   */
  @Equals(1)
  readonly specversion;
Example #2
Source File: role.validator.ts    From ddd-cqrs-es-aws-sam with MIT License 5 votes vote down vote up
@ValidateIf(o => o.disabled !== undefined)
  @Equals(false)
  disabled!: boolean;
Example #3
Source File: user.validator.ts    From ddd-cqrs-es-aws-sam with MIT License 5 votes vote down vote up
@ValidateIf(o => o.disabled !== undefined)
  @Equals(false)
  disabled!: boolean
Example #4
Source File: user.validator.ts    From ddd-cqrs-es-aws-sam with MIT License 5 votes vote down vote up
@ValidateIf(o => o.disabled !== undefined)
  @Equals(false)
  disabled!: boolean
Example #5
Source File: user.validator.ts    From ddd-cqrs-es-aws-sam with MIT License 5 votes vote down vote up
@ValidateIf(o => o.disabled !== undefined)
  @Equals(false)
  disabled!: boolean;
Example #6
Source File: field.dto.ts    From ironfish-api with Mozilla Public License 2.0 5 votes vote down vote up
@Equals('boolean')
  readonly type!: 'boolean';
Example #7
Source File: field.dto.ts    From ironfish-api with Mozilla Public License 2.0 5 votes vote down vote up
@Equals('float')
  readonly type!: 'float';
Example #8
Source File: field.dto.ts    From ironfish-api with Mozilla Public License 2.0 5 votes vote down vote up
@Equals('integer')
  readonly type!: 'integer';
Example #9
Source File: field.dto.ts    From ironfish-api with Mozilla Public License 2.0 5 votes vote down vote up
@Equals('string')
  readonly type!: 'string';
Example #10
Source File: users-query.dto.ts    From ironfish-api with Mozilla Public License 2.0 5 votes vote down vote up
@ApiPropertyOptional({
    description: `Property to order results by. Defaults to 'rank'`,
  })
  @IsOptional()
  @Equals('rank')
  readonly order_by?: 'rank';
Example #11
Source File: auth-token.model.ts    From relate with GNU General Public License v3.0 5 votes vote down vote up
@IsString()
    @Equals('basic')
    scheme!: 'basic';
Example #12
Source File: auth-token.input.ts    From relate with GNU General Public License v3.0 5 votes vote down vote up
@Field(() => String)
    @Equals('basic')
    scheme: 'basic';