on master help sign in
revert: use the stricter email regex in validations
commitadbcda8281a78b6aa4e8158be4bbca7ee03a132a authorMatt Condon (shrugs) <mattgcondon@gmail.com> dateTue 25 Jun 2019, 10:13 (7 years ago) parent17a8377
1 file changed+2−2
src/lib/validators.js+2−2
src/lib/validators.js+2−2
@@ -3,8 +3,8 @@ import * as ob from 'urbit-ob';
33
44import { isValidAddress } from './wallet';
55
6−// W3C HTML5 type="email" validation regex via: https://emailregex.com/
7−const emailRegExp = /^[a-zA-Z0-9.!#$%&’*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/;
6+// via: https://emailregex.com/
7+const emailRegExp = /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
88
99// is this 64 hex chars?
1010const hexRegExp = /[0-9A-Fa-f]{64}/g;