mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-01-08 01:04:39 +08:00
fix(onboarding): Check code format before hitting API
This commit is contained in:
parent
e858eb6ebd
commit
170c8e4eea
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue