[MM-44161] Show both validation messages when adding new server if both fields are invalid (#2104)

This commit is contained in:
Devin Binnie 2022-05-12 12:04:51 -04:00 committed by GitHub
parent fcf0be0a38
commit 2e740d60bd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -125,7 +125,13 @@ export default class NewTeamModal extends React.PureComponent<Props, State> {
const urlError = this.getTeamUrlValidationError();
if (nameError && urlError) {
return 'Name and URL are required.';
return (
<>
{nameError}
<br/>
{urlError}
</>
);
} else if (nameError) {
return nameError;
} else if (urlError) {