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

Allow plugin to accept array of payload objects. #16

Open
joshferrell opened this issue Nov 29, 2017 · 0 comments
Open

Allow plugin to accept array of payload objects. #16

joshferrell opened this issue Nov 29, 2017 · 0 comments

Comments

@joshferrell
Copy link
Owner

Description

Allow plugin to send array of address. Route could look something like this

server.route({
    method: 'POST',
    path: '/',
    handler: {
        email: {
            subject: 'test',
            component: SimpleEmail
        }
    },
    config: {
        validate: {
             payload: joi.array().items(joi.object({
                   email: joi.string().required()
             }
       }
    }
});
@joshferrell joshferrell added this to the version 1.0.0 milestone Nov 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant