fix(onboarding): Check code format before hitting API

This commit is contained in:
Ben Gotow 2015-10-27 16:43:07 -07:00
parent e858eb6ebd
commit 170c8e4eea

View file

@ -123,10 +123,10 @@ class TokenAuthPage extends React.Component
if @state.tokenAuthInflight
return
if not @state.token
if not @state.token or not /^[\w]{32}$/.test(@state.token)
@setState({
tokenAuthInflight: false,
tokenValidityError: "Please enter an invitation code."
tokenValidityError: "Please enter a valid invitation code."
})
@_resize()
return