UNPKG

node-web-mvc

Version:
32 lines (31 loc) 1 kB
import ValidationContext from '../ValidationContext'; import Constraints from './Constraints'; declare class Min extends Constraints { message?: string; /** * 设定能赋值的最大值 */ value: number; getSize(value: any, context: ValidationContext): any; isValid(content: any, context: ValidationContext): boolean; } /** * 验证标注元素的值必须大于等于配置的最小值 * * 支持的数据类型: * * - `Number` * - `String` * * `null` 或者 `undefined` 则不做验证 */ declare const _default: { (options: number | import("../../servlets/annotations/Target").CreateOptions<typeof Min>): (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 Min> & typeof Min; export default _default;