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

Top comments (2)

Collapse
 
gkoniaris profile image
George Koniaris

I think the correct syntax is:

return schema.validate(data)

Collapse
 
brokylabs profile image
Catur Hidayat

i am using joi from hapijs for validattion