class-validator#IsIn TypeScript Examples
The following examples show how to use
class-validator#IsIn.
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: shared.dto.ts From affinidi-core-sdk with Apache License 2.0 | 6 votes |
@IsArray()
@IsIn(['rsa', 'bbs', 'ecdsa'], { each: true })
keyTypes: KeyAlgorithmType[]
Example #2
Source File: event_action.ts From Deep-Lynx with MIT License | 6 votes |
@IsString()
@IsIn([
'data_imported',
'data_ingested',
'type_mapping_created',
'type_mapping_modified',
'file_created',
'file_modified',
'data_source_created',
'data_source_modified',
'data_exported',
'manual'
])
event_type?: string;
Example #3
Source File: vulnerabilities.ts From crossfeed with Creative Commons Zero v1.0 Universal | 6 votes |
@IsString()
@IsIn([
'title',
'createdAt',
'severity',
'cvss',
'state',
'createdAt',
'domain'
])
@IsOptional()
sort: string = 'createdAt';
Example #4
Source File: Vulnerability.ts From bulwark with MIT License | 5 votes |
@Column()
@IsIn(['Low', 'Medium', 'High', 'Critical', 'Informational'])
risk: string;
Example #5
Source File: Erc20Base.ts From tatum-blockchain-connector with MIT License | 5 votes |
@IsNotEmpty()
@IsIn([Currency.ONE])
public chain: Currency;
Example #6
Source File: Vulnerability.ts From bulwark with MIT License | 5 votes |
@Column()
@IsIn(['Open', 'Resolved', 'On Hold'])
status: string;
Example #7
Source File: Erc20Base.ts From tatum-blockchain-connector with MIT License | 5 votes |
@IsNotEmpty()
@IsIn([Currency.MATIC])
public chain: Currency;
Example #8
Source File: Vulnerability.ts From bulwark with MIT License | 5 votes |
@Column()
@IsIn(['Low', 'Medium', 'High'])
likelihood: string;
Example #9
Source File: Erc20Base.ts From tatum-blockchain-connector with MIT License | 5 votes |
@IsNotEmpty()
@IsIn([Currency.KCS])
public chain: Currency
Example #10
Source File: trade.entities.ts From tradingview-alerts-processor with MIT License | 5 votes |
@IsString()
@IsIn(SIDES)
direction: Side;
Example #11
Source File: PathChain.ts From tatum-blockchain-connector with MIT License | 5 votes |
@IsNotEmpty()
@IsIn([Currency.ETH, Currency.CELO, Currency.BSC, Currency.FLOW, Currency.XDC, Currency.TRON, Currency.ONE, Currency.KCS,
Currency.MATIC, Currency.EGLD, Currency.SOL, Currency.ALGO])
public chain: Currency;
Example #12
Source File: upload.dto.ts From life-helper-backend with MIT License | 5 votes |
@IsString()
@IsIn(['video', 'image'])
type: 'video' | 'image'
Example #13
Source File: vulnerabilities.ts From crossfeed with Creative Commons Zero v1.0 Universal | 5 votes |
@IsString()
@IsOptional()
@IsIn(['title'])
groupBy?: 'title';
Example #14
Source File: user.ts From Deep-Lynx with MIT License | 5 votes |
@IsString()
@IsIn(['editor', 'user', 'admin'])
role_name?: string;
Example #15
Source File: update-notification.input.ts From aws-nestjs-starter with The Unlicense | 5 votes |
@IsIn([NotificationStatus.Deleted])
@IsEnum(NotificationStatus)
@Field(/* istanbul ignore next */ () => NotificationStatus)
status: NotificationStatus;
Example #16
Source File: mutations.ts From backend with MIT License | 5 votes |
@Field()
@IsIn([CertificateState.manual, CertificateState.awaitingApproval])
state: CertificateState.manual | CertificateState.awaitingApproval;
Example #17
Source File: file.ts From Deep-Lynx with MIT License | 5 votes |
@IsString()
@IsIn(['filesystem', 'azure_blob', 'mock', 'largeobject'])
adapter?: string;
Example #18
Source File: vulnerabilities.ts From crossfeed with Creative Commons Zero v1.0 Universal | 5 votes |
@IsString()
@IsIn(['ASC', 'DESC'])
order: 'ASC' | 'DESC' = 'DESC';
Example #19
Source File: ChangeTodoCompletion.ts From remix-hexagonal-architecture with MIT License | 5 votes |
@IsString()
@IsIn(["on", "off"])
isChecked!: string;
Example #20
Source File: shared.dto.ts From affinidi-core-sdk with Apache License 2.0 | 5 votes |
@IsIn(SUPPORTED_ENVIRONMENTS)
env: Env
Example #21
Source File: metatype_key.ts From Deep-Lynx with MIT License | 5 votes |
@IsNotEmpty()
@IsString()
@IsIn(['number', 'number64', 'float', 'float64', 'date', 'string', 'boolean', 'enumeration', 'file', 'list', 'unknown'])
data_type = 'unknown';
Example #22
Source File: field.dto.ts From ironfish-api with Mozilla Public License 2.0 | 5 votes |
@IsIn(['boolean', 'float', 'integer', 'string'])
readonly type!: 'boolean' | 'float' | 'integer' | 'string';
Example #23
Source File: shared.dto.ts From affinidi-core-sdk with Apache License 2.0 | 5 votes |
@IsOptional()
@IsIn(SUPPORTED_DID_METHODS)
didMethod?: DidMethod
Example #24
Source File: task.ts From Deep-Lynx with MIT License | 5 votes |
@IsString()
@IsIn(['ready', 'working', 'completed', 'error', 'canceled'])
status?: 'ready' | 'working' | 'completed' | 'error' | 'canceled' = 'ready';
Example #25
Source File: CreateUserAdapter.ts From typescript-clean-architecture with MIT License | 5 votes |
@Expose()
@IsIn([UserRole.AUTHOR, UserRole.GUEST])
public role: UserRole;
Example #26
Source File: container.ts From Deep-Lynx with MIT License | 5 votes |
@IsString()
@IsIn(['information', 'warning', 'error'])
type?: string;