Backup error for blank name field
This commit is contained in:
parent
3e554043de
commit
f16b158c7f
|
|
@ -23,6 +23,7 @@
|
|||
"timezone": "Your time zone",
|
||||
|
||||
"errors": {
|
||||
"name_required": "Your name is needed to store your availability.",
|
||||
"password_incorrect": "Password is incorrect. Check your name is spelled right.",
|
||||
"unknown": "Failed to login. Please try again."
|
||||
},
|
||||
|
|
|
|||
|
|
@ -226,8 +226,14 @@ const Event = (props) => {
|
|||
}, [timezone]);
|
||||
|
||||
const onSubmit = async data => {
|
||||
if (!data.name || data.name.length === 0) {
|
||||
setFocus('name');
|
||||
return setError(t('event:form.errors.name_required'));
|
||||
}
|
||||
|
||||
setIsLoginLoading(true);
|
||||
setError(null);
|
||||
|
||||
try {
|
||||
const response = await api.post(`/event/${id}/people/${data.name}`, {
|
||||
person: {
|
||||
|
|
|
|||
Loading…
Reference in a new issue