Boolean validations
required: can't be undefined (default:false)equal: * equal to passed valuenullable: accepts null (default:false)
const User = attributes({
isAdmin: {
type: Boolean,
required: true
},
hasAcceptedTerms: {
type: Boolean,
nullable: true
}
})(class User { });Last updated
Was this helpful?