seneca
seneca copied to clipboard
built-in message validation inspired by Vue.js props validation
Except validation is deep. This:
seneca.add({
foo: 'bar',
count: Number,
what: String,
obj: {
zed: Boolean,
list: [String]
}
}, action)
@rjrodger Is it currently planned for the implementation of such message validation system to support union types? E.g. if, as a user, I want to match on ‘:foo‘ when it's either 'bar' or 'baz' or null. If yes, then what is the syntax envisioned to be like?