@travetto/schema
Advanced tools
Comparing version 0.0.26 to 0.0.27
@@ -28,3 +28,3 @@ { | ||
}, | ||
"version": "0.0.26" | ||
"version": "0.0.27" | ||
} |
@@ -40,3 +40,3 @@ import { CommonRegExp, SchemaRegistry, ClassList, ValidatorFn } from '../service'; | ||
export const Url = (message?: string) => Match(CommonRegExp.url, message); | ||
export const Precision = (precision: number) => prop({ precision }); | ||
export const Precision = (precision: number) => prop({ declared: { precision } }); | ||
export const Integer = () => prop({ precision: 0 }); | ||
@@ -43,0 +43,0 @@ export const Float = () => prop({ precision: 10 }); |
@@ -100,6 +100,2 @@ import { MetadataRegistry, RootRegistry, Class, ChangeEvent } from '@travetto/registry'; | ||
registerPendingFieldConfigSpecifierType(target: Class, prop: string, specifier: string) { | ||
return this.registerPendingFieldFacet(target, prop, { declared: { specifier } }); | ||
} | ||
registerPendingFieldConfig(target: Class, prop: string, type: ClassList, specifier?: string) { | ||
@@ -106,0 +102,0 @@ const isArray = Array.isArray(type); |
@@ -28,6 +28,10 @@ import { Class } from '@travetto/registry'; | ||
aliases?: string[]; | ||
declared: { type: Class<any>, array: boolean, specifier?: string }; | ||
declared: { | ||
type: Class<any>; | ||
array: boolean; | ||
specifier?: string; | ||
precision?: number | ||
}; | ||
required?: { message?: string }; | ||
match?: { re: RegExp, message?: string }; | ||
precision?: number; | ||
min?: { n: number | Date, message?: string }; | ||
@@ -34,0 +38,0 @@ max?: { n: number | Date, message?: string }; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1362
47045