Skip to content
This repository has been archived by the owner on Dec 27, 2023. It is now read-only.

Commit

Permalink
Merge pull request #207 from bwangpj/ug-empty-input
Browse files Browse the repository at this point in the history
Explain that 'empty' fields are not allowed
  • Loading branch information
rayshawntan authored Nov 13, 2023
2 parents 09c3daa + 5c0595c commit b147b7a
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions docs/UserGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,16 +93,22 @@ Should you need to make changes to an existing contact, use the `edit` command a
**Format:**
`add n/NAME p/PHONE_NUMBER e/EMAIL [o/NOTE] [t/TAG]... [a/ALTERNATE_CONTACT]...`

<div markdown="span" class="alert alert-info">
<div markdown="block" class="alert alert-info">
:information_source: **About tags:**
Duplicate tags are only counted once.

- Duplicate tags are only counted once.
- Specifying empty tags (`t/` with no value) is not allowed when adding contacts. If you wish to specify no tags, you may simply leave out the `t/` parameter.
</div>

<div markdown="span" class="alert alert-info">
<div markdown="block" class="alert alert-info">
:information_source: **About the alternate contact format:**
The format for `ALTERNATE_CONTACT` is `TYPE: USERNAME`, roughly looking like `SocialMedia: Username`. Ensure to include a space between the colon and the Username.

- The format for `ALTERNATE_CONTACT` is `TYPE: USERNAME`, roughly looking like `SocialMedia: Username`. Ensure to include a space between the colon `:` and the `Username`.
- Specifying empty alternate contacts (`a/` with no value) is not allowed when adding contacts. If you wish to specify no alternate contacts, you may simply leave out the `a/` parameter.
</div>



**Examples:**

- `add n/John Doe p/98765432 e/[email protected]`
Expand Down Expand Up @@ -132,8 +138,8 @@ Please refer to the [above](#adding-a-contact-add).
- Each specified parameter will have its new value(s) replace all existing value(s) for that parameter.\
e.g. `edit 1 n/The Myth` will edit the name of contact #`1` to `The Myth`, without changing any other parameter values for that contact.
- When editing tags, the new specified tag(s) will similarly replace all existing tag(s).\
You can specify no tags via a _single_ `t/` without a value.
- Likewise, when editing alternate contacts, you can specify no alternate contacts via a _single_ `a/` without a value.
You can specify no tags (i.e. clear all tags) via a _single_ `t/` without a value.
- Likewise, when editing alternate contacts, you can specify no alternate contacts (i.e. clear all alternate contacts) via a _single_ `a/` without a value.

**Examples:**

Expand Down

0 comments on commit b147b7a

Please sign in to comment.