Skip to content

Commit

Permalink
chore: fix validate custom network name field on form submission, closes
Browse files Browse the repository at this point in the history
  • Loading branch information
Nithishvb authored and pete-watters committed Jan 18, 2024
1 parent d4c99d5 commit 96817a9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/app/features/add-network/add-network.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,11 @@ export function AddNetwork() {
onSubmit={async () => {
const { name, stacksUrl, bitcoinUrl, key } = formikProps.values;

if (!name) {
setError('Enter a name');
return;
}

if (!isValidUrl(stacksUrl)) {
setError('Enter a valid Stacks API URL');
return;
Expand Down

0 comments on commit 96817a9

Please sign in to comment.