From d929de74af5c04e4c738f69667d495ba4e9b4e08 Mon Sep 17 00:00:00 2001 From: cwhinfrey Date: Fri, 21 Apr 2017 22:04:33 -0400 Subject: [PATCH] Add AddressBond input validator --- src/index.jsx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/index.jsx b/src/index.jsx index 75bffab..ebe8b39 100644 --- a/src/index.jsx +++ b/src/index.jsx @@ -222,6 +222,13 @@ HashBond.defaultProps = { validator: v => v.startsWith('0x') && v.length == 66 }; +export class AddressBond extends TextBond {} +AddressBond.defaultProps = { + floatingLabelText: 'Enter an address to look up', + invalidText: 'Invalid address', + validator: parity.api.util.isAddressValid +}; + export class URLBond extends TextBond {} URLBond.defaultProps = { floatingLabelText: 'Enter a URL',