Added missed error messages. Fixed input style for activation

This commit is contained in:
SleepWalker 2016-05-10 07:30:43 +03:00
parent d7da2bba7e
commit 651ec10c62
3 changed files with 26 additions and 1 deletions

View File

@ -19,6 +19,7 @@
}
.activationCodeInput {
composes: darkTextField from 'components/ui/form/form.scss';
composes: blueTextField from 'components/ui/form/form.scss';
text-align: center;

View File

@ -31,11 +31,15 @@ const errorsMap = {
),
'error.username_required': () => <Message {...messages.usernameRequired} />,
'error.username_invalid': () => <Message {...messages.usernameInvalid} />,
'error.username_too_short': () => <Message {...messages.usernameTooShort} />,
'error.username_too_long': () => <Message {...messages.usernameTooLong} />,
'error.username_not_available': () => <Message {...messages.usernameUnavailable} />,
'error.email_required': () => <Message {...messages.emailRequired} />,
'error.email_too_long': () => <Message {...messages.emailToLong} />,
'error.email_invalid': () => <Message {...messages.emailInvalid} />,
'error.email_is_tempmail': () => <Message {...messages.emailIsTempmail} />,
'error.email_not_available': () => (
<span>
<Message {...messages.emailNotAvailable} />

View File

@ -46,6 +46,21 @@ export default defineMessages({
defaultMessage: 'Username is required'
},
usernameInvalid: {
id: 'usernameInvalid',
defaultMessage: 'Username is invalid'
},
usernameTooShort: {
id: 'usernameTooShort',
defaultMessage: 'Username is too short'
},
usernameTooLong: {
id: 'usernameTooLong',
defaultMessage: 'Username is too long'
},
usernameUnavailable: {
id: 'usernameUnavailable',
defaultMessage: 'This username is already taken'
@ -61,6 +76,11 @@ export default defineMessages({
defaultMessage: 'Email is invalid'
},
emailToLong: {
id: 'emailToLong',
defaultMessage: 'Email is too long'
},
emailIsTempmail: {
id: 'emailIsTempmail',
defaultMessage: 'Tempmail E-mail addresses is not allowed'