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

AWS GenAI LIVE image

How is generative AI increasing efficiency?

Join AWS GenAI LIVE! to find out how gen AI is reshaping productivity, streamlining processes, and driving innovation.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay