class-validator
Version:
Decorator-based property validation for classes.
16 lines (15 loc) • 836 B
TypeScript
import { ValidationOptions } from '../ValidationOptions';
import * as ValidatorJS from 'validator';
export declare const IS_ISO8601 = "isIso8601";
/**
* Checks if the string is a valid ISO 8601 date.
* If given value is not a string, then it returns false.
* Use the option strict = true for additional checks for a valid date, e.g. invalidates dates like 2019-02-29.
*/
export declare function isISO8601(value: unknown, options?: ValidatorJS.IsISO8601Options): boolean;
/**
* Checks if the string is a valid ISO 8601 date.
* If given value is not a string, then it returns false.
* Use the option strict = true for additional checks for a valid date, e.g. invalidates dates like 2019-02-29.
*/
export declare function IsISO8601(options?: ValidatorJS.IsISO8601Options, validationOptions?: ValidationOptions): PropertyDecorator;