joi-ethereum-address

1.0.0 • Public • Published

joi-ethereum-address

A fork from joi-objectid

A MongoDB Ethereum address validator for Joi.

use

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()
})

Installation

npm install joi-ethereum-address --save

Development

running tests

  • npm test

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i joi-ethereum-address

Weekly Downloads

2

Version

1.0.0

License

MIT

Unpacked Size

7.19 kB

Total Files

7

Last publish

Collaborators

  • haidang666