yup-ethereum
v1.0.0
Published
Yup extension that validates an Ethereum address
Downloads
3
Maintainers
Readme
yup-ethereum
Yup extension that validates an Ethereum address.
:warning: This extension implements a lightweight version of the
web3.js
utility functions. Without supplying the actual public key, it's tricky to perfectly validate a given address.
Install
# NPM
npm i --save-dev yup-ethereum
# Yarn
yarn add -D yup-ethereum
Usage
Here's some example usage to get you started:
import * as Yup from 'yup';
import 'yup-ethereum';
const ethereumSchema = Yup.string().ethereum().required();
schema.isValidSync('0xc1912fee45d61c87cc5ea59dae31190fffff232d') // true
Contributors
Don't be scared to raise an issue or a pull request!
Any contributions, no matter how big or small will land your picture here and be greatly appreciated ❤️