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

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more