- fix typescript definitions.
- add
uuid
rule by @intech. #43 - fix typescript exposing by @darky. #58
- add personalised error messages per field by @ispyinternet. #57
- add strict object validation by @fabioanderegg & @mbaertschi. #47
- linting sources.
- add error message for
url
rule. - add
numeric
attribute tostring
rule. - add
alpha
,alphanum
&alphadash
attributes tostring
rule. - add
index.d.ts
file. - fix multiple validator with different messages issue.
- support recursive schemas by @andersnm
- fix irregular object property names
- fix #27 - multiple optional validators
- fix #25 - multiple optional validators
- Add new
enum
rule{ type: "enum", values: ["male", "female"] }
- supports multiple object validators #22 by @mauricedoepke
const schema = { list: [ { type: "object", props: { name: {type: "string"}, age: {type: "number"}, } }, { type: "object", props: { country: {type: "string"}, code: {type: "string"}, } } ] };
Access to the original object in custom validator #5
const schema = {
email: {
type: "custom",
check(value, schema, stack, obj) {
return obj.username || obj.email ? null : this.makeError(...);
}
}
};