Skip to content

Commit

Permalink
Merge pull request #148 from guanquann/ug-bug-fix-v2.0
Browse files Browse the repository at this point in the history
Add input constraints to UG
  • Loading branch information
guanquann authored Apr 15, 2024
2 parents 00637c0 + 518392e commit 77b1274
Showing 1 changed file with 27 additions and 8 deletions.
35 changes: 27 additions & 8 deletions docs/UserGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ pageNav: 3
- [Introduction](#introduction)
- [About](#about)
- [Quick Start](#quick-start)
- [Input Constraints](#input-constraints)
- [Features](#features)
- [Adding a contact : add](#adding-a-contact-add)
- [Listing all contacts : list](#listing-all-contacts-list)
Expand Down Expand Up @@ -94,6 +95,32 @@ This user guide provides in-depth documentation on GourmetGrid's installation pr

--------------------------------------------------------------------------------------------------------------------

## Input Constraints

* Name and company should only contain alphanumeric characters, spaces, hyphens and/or apostrophes, and should not be blank.

* Phone number should only contain numbers and should be at least 3 digits long.

* Email should be of the format `local-part@domain` and adhere to the following constraints:

* The local-part should only contain alphanumeric characters and these special characters, excluding the parentheses, `(+_.-)`. The local-part may not start or end with any special characters.

* This is followed by a `@` and then a domain name. The domain name is made up of domain labels separated by periods.

* The domain name must:

* end with a domain label at least 2 characters long.

* have each domain label start and end with alphanumeric characters.

* have each domain label consist of alphanumeric characters, separated only by hyphens, if any.

Address should not contain any words that begin with reserved terms (`n/`, `p/`, `e/`, `c/`, `t/`) that indicate other parameters.

Remark should not contain any words that begin with reserved terms (`d/`) that indicate the date parameter.

* Date should be in the format `YYYY-MM-DD`, where `YYYY` is the year (all the digits, i.e. 2012), `MM` is the month (01 to 12) and `DD` is the day (01 to 31).

## Features


Expand Down Expand Up @@ -134,12 +161,6 @@ Format: `add n/NAME p/PHONE_NUMBER e/EMAIL a/ADDRESS c/COMPANY [t/TAG]…​`

**Notes:**

* Name and company should only contain alphanumeric characters, spaces, hyphens and/or apostrophes, and should not be blank.

* Phone number should only contain numbers and should be at least 3 digits long.

* Address should not contain any words that begin with reserved terms (`n/`, `p/`, `e/`, `c/`, `t/`) that indicate other parameters.

* A contact can have any number of tags (including 0).

* Two contacts cannot share the same name, as names are used to uniquely identify individuals within the system.
Expand Down Expand Up @@ -354,8 +375,6 @@ Format: `addorder INDEX d/DATE r/REMARK`
* A contact can have any number of orders (including 0).

* You can add multiple orders with identical remarks and dates to the same contact. This functionality is designed to accommodate the need for duplicating orders efficiently during periods of high demand, eliminating the need to delete and re-enter the original order.

* Remark should not contain any words that begin with reserved term (`d/`) that indicate the date parameter.
</box>

Examples:
Expand Down

0 comments on commit 77b1274

Please sign in to comment.