Skip to content

Make vpc, subnet required for NIC creation#1006

Merged
just-be-dev merged 2 commits into
mainfrom
nic-require-vpc-subnet
Jun 30, 2022
Merged

Make vpc, subnet required for NIC creation#1006
just-be-dev merged 2 commits into
mainfrom
nic-require-vpc-subnet

Conversation

@just-be-dev

Copy link
Copy Markdown
Contributor

Fixes #993

require-vpc-subnet
3

@vercel

vercel Bot commented Jun 30, 2022

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
console-ui-storybook ✅ Ready (Inspect) Visit Preview Jun 30, 2022 at 1:55AM (UTC)

label="Subnet"
vpcNameField="vpcName"
vpcs={vpcs}
// required

This comment was marked as resolved.

const [, { value }, { setValue }] = useField<ItemValue>({
name,
validate: (v) => (required && !v ? `${name} is required` : undefined),
})

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

didn't realize you could just do this. nice!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep. In practice the error message isn't showing (it's not actually wired up) but that's fine for now. The behavior of not letting us submit until something is selected is what we're really going for.

@just-be-dev just-be-dev merged commit 256d2fe into main Jun 30, 2022
@just-be-dev just-be-dev deleted the nic-require-vpc-subnet branch June 30, 2022 02:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

VPC and subnet name should be required in NIC create form

2 participants