Skip to content

Commit

Permalink
Raise error if title length < 4
Browse files Browse the repository at this point in the history
  • Loading branch information
chennisden committed Aug 6, 2024
1 parent 7c90a73 commit 78fc219
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions frontend/src/components/listing/ListingHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ const ListingTitle = (props: Props) => {
setIsEditing(false);
return;
}
if (newTitle.length < 4) {
addErrorAlert("Title must be at least 4 characters long.");
return;
}
setSubmitting(true);
const { error } = await auth.client.PUT("/listings/edit/{id}", {
params: {
Expand Down

0 comments on commit 78fc219

Please sign in to comment.