Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/onboarding/containers/LoginPageContents.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -174,11 +174,15 @@ class LoginPageContents extends PureComponent<Props> {
const {email, password} = this.state

const emailError = email === '' ? 'Email is required' : ''
const pwlen = new Blob([password]).size

const passwordError = password === '' ? 'Password is required' : ''
const passwordLenError = pwlen > 72 ? 'Password is longer than 72 bytes' : ''

const errors: ErrorObject = {
emailError,
passwordError,
passwordLenError,
}

const isValid = Object.values(errors).every(error => error === '')
Expand Down