-
-
Notifications
You must be signed in to change notification settings - Fork 1
Required
Alan Berdinelli edited this page Nov 24, 2020
·
2 revisions
All properties in Schemy are optional, unless you specify otherwise.
const Schema = require('schemy');
const Example = new Schema({
data: {
type: String,
required: true
}
});You can also specify your property as required, and validate the type as well in a simplified way:
const Schema = require('schemy');
const Example = new Schema({
data: String
});Developed with ♥ by Alan Berdinelli.