DEV Community

loading...

validate error using joi

catur_hida_yat profile image Catur Meong ・1 min read

Hi all

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

Alt Text

Alt Text

Discussion (2)

pic
Editor guide
Collapse
gkoniaris profile image
George Koniaris

I think the correct syntax is:

return schema.validate(data)

Collapse
catur_hida_yat profile image
Catur Meong Author

i am using joi from hapijs for validattion