-
Notifications
You must be signed in to change notification settings - Fork 4
String
Sergej edited this page Apr 30, 2019
·
1 revision
const schema = new Schema<Model>()
.with(m => m.StringProp, "specificValue")
.build();
const schema = new Schema<Model>()
.with(m => m.StringProp, x => x.length >= 10)
.build();
Supported operators: ==
, ===
, >=
, <=
, >
, <
const schema = new Schema<Model>()
.with(m => m.StringProp, /^[A-z]+\.[A-z]+$/)
.build();
const schema = new Schema<Model>()
.with(m => m.StringProp, new StringSchema({
format: "date-time"
}))
// or
.with(m => m.StringProp, new StringSchema({
format: "ipv4"
}))
.build();