A fork from joi-objectid
A MongoDB Ethereum address validator for Joi.
joi-ether-address
validates that the value is an address on ethereum block chain
It's used just like you'd use any other Joi
type.
const Joi = require('@hapi/joi')
Joi.ethereumAddress = require('joi-ethereum-address')(Joi)
const schema = Joi.object({
id: Joi.ethereumAddress(),
name: Joi.string().max(100),
date: Joi.date()
})
npm install joi-ethereum-address --save
npm test