DEV Community

Catur Hidayat
Catur Hidayat

Posted on

validate error using joi

Hi all

I'm having trouble validating using JOI, please correct my code. where was my mistake

Alt Text

Alt Text

Discussion (2)

Collapse
gkoniaris profile image
George Koniaris

I think the correct syntax is:

return schema.validate(data)

Collapse
brokylabs profile image
Catur Hidayat Author

i am using joi from hapijs for validattion