Skip to content

Commit

Permalink
Add input constraints to UG
Browse files Browse the repository at this point in the history
  • Loading branch information
guanquann committed Apr 15, 2024
1 parent 3164c82 commit d9ebe09
Showing 1 changed file with 25 additions and 8 deletions.
33 changes: 25 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,30 @@ 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.

* Emails 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 and remark should not contain any words that begin with reserved terms such as `n/`, `p/`, `d/` that indicate other parameters.

* 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 +159,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 +373,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 d9ebe09

Please sign in to comment.