diff options
author | =Corey Hulen <corey@hulen.com> | 2015-09-23 12:55:58 -0700 |
---|---|---|
committer | =Corey Hulen <corey@hulen.com> | 2015-09-23 12:55:58 -0700 |
commit | 2b5b8f95ed9de37a15dc68c38c46a1da2bb1e160 (patch) | |
tree | d5bf8318dc82d96cd34b83481e1cc5c8289d170a /web/react/components/password_reset_send_link.jsx | |
parent | 9e04909c0a3672d27c148c931d82b225cc86dfe5 (diff) | |
parent | 0170cfe604e6cfb430be0b6181243ca85a9ab27b (diff) | |
download | chat-2b5b8f95ed9de37a15dc68c38c46a1da2bb1e160.tar.gz chat-2b5b8f95ed9de37a15dc68c38c46a1da2bb1e160.tar.bz2 chat-2b5b8f95ed9de37a15dc68c38c46a1da2bb1e160.zip |
Merge branch 'master' into PLT-11-email
Diffstat (limited to 'web/react/components/password_reset_send_link.jsx')
-rw-r--r-- | web/react/components/password_reset_send_link.jsx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/web/react/components/password_reset_send_link.jsx b/web/react/components/password_reset_send_link.jsx index 1e6cc3607..37d4a58cb 100644 --- a/web/react/components/password_reset_send_link.jsx +++ b/web/react/components/password_reset_send_link.jsx @@ -1,6 +1,7 @@ // Copyright (c) 2015 Spinpunch, Inc. All Rights Reserved. // See License.txt for license information. +const Utils = require('../utils/utils.jsx'); var client = require('../utils/client.jsx'); export default class PasswordResetSendLink extends React.Component { @@ -15,8 +16,8 @@ export default class PasswordResetSendLink extends React.Component { e.preventDefault(); var state = {}; - var email = React.findDOMNode(this.refs.email).value.trim(); - if (!email) { + var email = React.findDOMNode(this.refs.email).value.trim().toLowerCase(); + if (!email || !Utils.isEmail(email)) { state.error = 'Please enter a valid email address.'; this.setState(state); return; @@ -67,7 +68,7 @@ export default class PasswordResetSendLink extends React.Component { <p>{'To reset your password, enter the email address you used to sign up for ' + this.props.teamDisplayName + '.'}</p> <div className={formClass}> <input - type='text' + type='email' className='form-control' name='email' ref='email' |