UNPKG

node-web-mvc

Version:
32 lines (31 loc) 907 B
import Constraints from './Constraints'; declare class Digits extends Constraints { message?: string; /** * 整数部分最大位数 */ integer: number; /** * 小数部分最大位数 */ fraction: number; isValid(value: number): boolean; } /** * 验证配置小数数值的整数位与小数位长度 * * 支持的类型 * - `Number` * * `null` 或者 `undefined` 则不做验证 */ declare const _default: { (options: import("../../servlets/annotations/Target").CreateOptions<typeof Digits>): (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 Digits> & typeof Digits; export default _default;