Last active
June 8, 2018 00:59
-
-
Save YKalashnikov/911954686b5c25a5c7fbe83b3e9a1b65 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const validate = inputs => { | |
const errors = {}; | |
if (!inputs.username) { | |
errors.username = 'Введите имя пользователя'; | |
} else if (inputs.username !== 'Юрчик') { | |
errors.username = 'Имя пользователя неверно'; | |
} | |
if (!inputs.password) { | |
errors.password = 'Введите ваш пароль'; | |
} | |
return errors; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment