From 2414d6a59e0de9d8580032d657a651f3cb7f74c7 Mon Sep 17 00:00:00 2001 From: JerryWang0000 Date: Sun, 14 Apr 2024 07:01:47 +0800 Subject: [PATCH 1/2] Add illustration to valid names --- docs/UserGuide.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/UserGuide.md b/docs/UserGuide.md index bc2f9f33815..9dc6cb49e63 100644 --- a/docs/UserGuide.md +++ b/docs/UserGuide.md @@ -494,7 +494,7 @@ Therefore, edit the data file only if you are confident that you can update it c Attribute | Prefix | Restrictions | Examples ----------|--------|--------------|--------------------- -Name[^1] | n/ | Case-sensitive.
Only alphanumeric characters allowed. Spaces are only allowed between alphanumeric characters. | `alex yeoh`, `Bernice Yu`, `test1` +Name[^1] | n/ | Case-sensitive.
Only alphanumeric characters allowed. Spaces are only allowed between alphanumeric characters.
Values including non-alphanumeric characters are considered invalid. If a person's name includes special character (characters not included in modern English) like arabic characters (such as أ, ب, ت, etc.), it should be latinized first. | `alex yeoh`, `Bernice Yu`, `test1` Phone Number[^1] | p/ | Numeric digits only, no special characters, at least 3 digits long. | `123`, `88888888, 12345678` Email[^1] | e/ | Valid email of the format `local-part@domain`.
1. `local-part` should only contain alphanumeric characters and the special characters `+_.-`
2. `local-part` may not start or end with any special characters.
3. `local-part` must be followed by exactly one `@` and then a `domain` name.
4. `domain` must be made up of at least 2 `domain` labels separated by periods.
5. Each `domain` name must be at least 2 alphanumeric characters long.
6. Each `domain` name must start and end with alphanumeric characters.
7. Each `domain` name can only consist of alphanumeric characters, separated by hyphens, if any. | `e@123.com`, `hello@h-h.com`, `one+two@h-h.hh`, `hello@e-h.e-hh` Module[^1] | m/ | Case-insensitive.
Valid module consisting of 2-4 letters, followed by exactly 4 numeric digits, with a suffix that is at most 2 characters long. | `gess1025`, `hsi1000`, `cs2103t` From b6ebc23dba59834c155b32bd92400d71b36bc1d7 Mon Sep 17 00:00:00 2001 From: JerryWang0000 Date: Sun, 14 Apr 2024 07:16:00 +0800 Subject: [PATCH 2/2] Illustrate the uniqueness of persons' names --- docs/UserGuide.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/docs/UserGuide.md b/docs/UserGuide.md index 9dc6cb49e63..b36a39bbc7e 100644 --- a/docs/UserGuide.md +++ b/docs/UserGuide.md @@ -485,16 +485,17 @@ Therefore, edit the data file only if you are confident that you can update it c 1. **When using multiple screens**, if you move the application to a secondary screen, and later switch to using only the primary screen, the GUI will open off-screen. The remedy is to delete the `preferences.json` file created by the application before running the application again. 2. **When adding/editing phone number with a descriptor**, If you try to add a number with a descriptor such as `98731094 (home)`, the application rejects this input and advise the user to only provide phone numbers with numerical values only. The phone number is not intended to store phone number descriptor but users can consider using tags such as t/homePhone as a workaround. -3. **When adding/editing name containing special characters**, If you try to add a name such as `Jason s/o William`, the application rejects this input and advise the user to only provide name with alphanumeric values only. The name is not intended to store special characters but users can consider using `so` or `son of` as a workaround. -4. **When adding/editing venues containing space with an attribute prefix**, If you try to add a venue such as `Room 12 t/r`, the application will add a person with a venue `Room 12` and a tag `r` instead of the intended venue `Room 12 t/r`. The venue is not intended to store venues that contains a space followed by an attribute prefix but users can consider omitting the space or replace with a hyphen such as `Room 12t/r` or `Room 12-t/r` as a workaround. -5. **When generating the default file and exiting via the `Exit` button**, If you try to generate the default JSON file `[JAR file location]/data/staffconnect.json` by running the JAR file, without manipulating any data and exiting via the `Exit` button, the JSON file would not be generated. You may consider using the `exit` command via the command line interface to generate the default JSON file instead. +3. **When adding/editing name containing special characters**, If you try to add a name such as `Jason s/o William`, the application rejects this input and advise the user to only provide name with alphanumeric values only. The name is not intended to store special characters but users can consider using `so` or `son of` as a workaround. If a person's name includes special characters (characters not included in modern English) like arabic characters (such as أ, ب, ت, etc.), it should be latinized first. +4. **When adding/editing name that already exists in the staff book**, if you try to do so, an error message will be prompted, as two persons are considered the same person as long as they have the same name. It is inplausible to has two persons with the same name but other different attributes. +5. **When adding/editing venues containing space with an attribute prefix**, If you try to add a venue such as `Room 12 t/r`, the application will add a person with a venue `Room 12` and a tag `r` instead of the intended venue `Room 12 t/r`. The venue is not intended to store venues that contains a space followed by an attribute prefix but users can consider omitting the space or replace with a hyphen such as `Room 12t/r` or `Room 12-t/r` as a workaround. +6. **When generating the default file and exiting via the `Exit` button**, If you try to generate the default JSON file `[JAR file location]/data/staffconnect.json` by running the JAR file, without manipulating any data and exiting via the `Exit` button, the JSON file would not be generated. You may consider using the `exit` command via the command line interface to generate the default JSON file instead. -------------------------------------------------------------------------------------------------------------------- ## Attribute summary Attribute | Prefix | Restrictions | Examples ----------|--------|--------------|--------------------- -Name[^1] | n/ | Case-sensitive.
Only alphanumeric characters allowed. Spaces are only allowed between alphanumeric characters.
Values including non-alphanumeric characters are considered invalid. If a person's name includes special character (characters not included in modern English) like arabic characters (such as أ, ب, ت, etc.), it should be latinized first. | `alex yeoh`, `Bernice Yu`, `test1` +Name[^1] | n/ | Case-sensitive.
Only alphanumeric characters allowed. Spaces are only allowed between alphanumeric characters. | `alex yeoh`, `Bernice Yu`, `test1` Phone Number[^1] | p/ | Numeric digits only, no special characters, at least 3 digits long. | `123`, `88888888, 12345678` Email[^1] | e/ | Valid email of the format `local-part@domain`.
1. `local-part` should only contain alphanumeric characters and the special characters `+_.-`
2. `local-part` may not start or end with any special characters.
3. `local-part` must be followed by exactly one `@` and then a `domain` name.
4. `domain` must be made up of at least 2 `domain` labels separated by periods.
5. Each `domain` name must be at least 2 alphanumeric characters long.
6. Each `domain` name must start and end with alphanumeric characters.
7. Each `domain` name can only consist of alphanumeric characters, separated by hyphens, if any. | `e@123.com`, `hello@h-h.com`, `one+two@h-h.hh`, `hello@e-h.e-hh` Module[^1] | m/ | Case-insensitive.
Valid module consisting of 2-4 letters, followed by exactly 4 numeric digits, with a suffix that is at most 2 characters long. | `gess1025`, `hsi1000`, `cs2103t`