Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Defining Schema #49

Closed
samseralam opened this issue Sep 8, 2017 · 1 comment
Closed

Defining Schema #49

samseralam opened this issue Sep 8, 2017 · 1 comment

Comments

@samseralam
Copy link

samseralam commented Sep 8, 2017

If there is a field in schema like this:

name: {
firstName: {
type: Types.String,
required: true
},
lastName: {
type: Types.String,
required: true
}
}

when i am going to save, it says : "message": ""value" at position 0 fails because ["name" is not allowed]
So how can save it on above schema?

@JKHeadley
Copy link
Owner

Try:

        name: {
            firstName: {
                type: Types.String,
                required: true
            },
            lastName: {
                type: Types.String,
                required: true
            },
            type: Types.Object
        }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants