Skip to content

Commit

Permalink
chore: update type error for schema location
Browse files Browse the repository at this point in the history
  • Loading branch information
blushi committed Feb 27, 2023
1 parent 00a45fa commit 8b2ed24
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions web-registry/src/components/organisms/ProjectLocationForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ export interface ProjectLocationFormValues {

const ProjectLocationFormSchema = Yup.object().shape({
'schema:location': Yup.object()
// before the user selects the location, the value is a string,
// but we don't want to show yup default type error message
.typeError('')
.test('is-not-empty', requiredMessage, value => !isEmpty(value))
.required(requiredMessage),
});
Expand Down

0 comments on commit 8b2ed24

Please sign in to comment.