Skip to content

Commit

Permalink
fix: reset error object create model form (#357)
Browse files Browse the repository at this point in the history
close the issue
[https://github.com/instill-ai/console/issues/307](https://github.com/instill-ai/console/issues/307)

Co-authored-by: Naman Anand <naman.anand@noema.net>
  • Loading branch information
iamnamananand996 and Naman Anand committed Feb 27, 2023
1 parent d72196a commit e664c05
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/components/model/CreateModelForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,11 @@ export const CreateModelForm = () => {
id: "Resource ID restricts to lowercase letters, numbers, and hyphen, with the first character a letter, the last a letter or a number, and a 63 character maximum.",
}));
return;
} else if (fieldErrors.id) {
setFieldErrors((prev) => ({
...prev,
id: null,
}));
}

setCreateModelMessageBoxState(() => ({
Expand Down

0 comments on commit e664c05

Please sign in to comment.