Skip to content

Commit

Permalink
Merge pull request #179 from kab-dot/fix-additem-for-single-character
Browse files Browse the repository at this point in the history
Fix additem for single character
  • Loading branch information
kab-dot authored Apr 13, 2024
2 parents 905218d + 9015535 commit 6133151
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ public AddItemCommand(Item item) {
toAdd = item;
}


@Override
public CommandResult execute(Model model) throws CommandException {
requireNonNull(model);
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/seedu/address/model/item/Item.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ public class Item implements Cloneable {

public static final String MESSAGE_CONSTRAINTS =
"Item names should contain alphabets and spaces, and cannot be blank.";
public static final String ITEM_NAME_VALIDATION_REGEX = "^[a-zA-Z][a-zA-Z\\s]+$";
public static final String ITEM_NAME_VALIDATION_REGEX = "^[a-zA-Z][a-zA-Z\\s]*$";

private String name;
private int points;
Expand Down

0 comments on commit 6133151

Please sign in to comment.