Skip to content

Commit

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

0 comments on commit 99966c5

Please sign in to comment.