UNPKG

class-validator-extended

Version:
22 lines (21 loc) 722 B
import type { ValidationOptions } from 'class-validator'; /** @hidden */ export declare const IS_AWS_REGION = "isAwsRegion"; /** * Checks if the given value is an AWS region string. * * Beware that this decorator only checks for syntactic validity, it does not check if the region really exists. For * instance, it will accept `eu-central-9` which - at the time of writing - does not exist. * * #### Example * ```typescript * // Ensure the value is a valid looking AWS region * @IsAwsRegion() * region: string = 'eu-central-1' * ``` * * @category String * @deprecated * @param options Generic class-validator options. */ export declare function IsAwsRegion(options?: ValidationOptions): PropertyDecorator;