-
Notifications
You must be signed in to change notification settings - Fork 4
Number
Sergej edited this page Apr 30, 2019
·
1 revision
const schema = new Schema<Model>()
.with(m => m.NumberProp, new NumberSchema({
multipleOf: 10
}))
.build();
const schema = new Schema<Model>()
.with(m => m.NumberProp, x => x >= 10)
// or
.with(m => m.NumberProp, new NumberSchema({
minimum: 10,
maximum: 15,
})
.build();
Supported operators: ==
, ===
, >=
, <=
, >
, <
Does not make use of exclusiveMaximum
due to differences in implementations between drafts.