From 170c8e4eea8cbb2d291111bcaf83846b47df97b4 Mon Sep 17 00:00:00 2001 From: Ben Gotow Date: Tue, 27 Oct 2015 16:43:07 -0700 Subject: [PATCH] fix(onboarding): Check code format before hitting API --- internal_packages/onboarding/lib/token-auth-page.cjsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal_packages/onboarding/lib/token-auth-page.cjsx b/internal_packages/onboarding/lib/token-auth-page.cjsx index 7cb00670c..847285121 100644 --- a/internal_packages/onboarding/lib/token-auth-page.cjsx +++ b/internal_packages/onboarding/lib/token-auth-page.cjsx @@ -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