UNPKG

node-web-mvc

Version:
28 lines (27 loc) 889 B
/** * 被注释的元素必须是一个过去的日期 */ import ValidationContext from '../ValidationContext'; import Constraints from './Constraints'; declare class Past extends Constraints { message?: string; isValid(content: Date, context: ValidationContext): boolean; } /** * 验证配置元素的值必须是过去的日期 * * 支持的类型 * - Date * * `null` 或者 `undefined` 不做验证 */ declare const _default: { (options: import("../../servlets/annotations/Target").CreateOptions<typeof Past>): (target: Object, name: string, p?: number) => any; (target: { [x: string]: any; }, propertyKey: string): any; (target: { [x: string]: any; }, propertyKey: string, parameterIndex: number): any; } & import("../../servlets/annotations/annotation/type").LinkAnnotationType<typeof Past> & typeof Past; export default _default;