The Clientele+ application allows adding clients with phone numbers that do not follow standard formatting. For instance, a phone number like 00000000 was accepted, even though such a number is not a realistic or valid contact. This issue may result in storing unusable or incorrect contact information, which could hinder communication with clients.
Steps to Reproduce
Open the Clientele+ application.
Add a new client using the following command:
add n/John meow p/00000000 e/johnmeow@gmail.com a/Maxwell Street, #05-01 t/JP Morgan t/CTO ps/in progress py/pending cs/active d/09-09-2024
Observe that the client is successfully added with 00000000 as the phone number.
Expected Behavior
The application should validate phone numbers to ensure they follow standard formats. For example, it should check that the phone number:
Contains a non-trivial, realistic number sequence (not all zeros).
Meets typical phone number length requirements (e.g., 8 to 15 digits).
A suitable error message could be:
"Invalid phone number format. Please enter a valid phone number."
Actual Behavior
The application accepts the input 00000000 without any validation or error message, resulting in a client entry with an invalid phone number.
Screenshot
Suggested Improvement
Implement phone number validation that checks for realistic formats, such as:
Rejecting phone numbers with all identical digits (e.g., 00000000, 11111111).
Enforcing a minimum length (e.g., 8 digits).
Ensuring the phone number is composed of valid numeric characters without unusual patterns.
This would improve data quality by ensuring only valid contact information is stored.
The Clientele+ application allows adding clients with phone numbers that do not follow standard formatting. For instance, a phone number like 00000000 was accepted, even though such a number is not a realistic or valid contact. This issue may result in storing unusable or incorrect contact information, which could hinder communication with clients.
Steps to Reproduce Open the Clientele+ application. Add a new client using the following command:
add n/John meow p/00000000 e/johnmeow@gmail.com a/Maxwell Street, #05-01 t/JP Morgan t/CTO ps/in progress py/pending cs/active d/09-09-2024
Observe that the client is successfully added with 00000000 as the phone number.Expected Behavior The application should validate phone numbers to ensure they follow standard formats. For example, it should check that the phone number:
Contains a non-trivial, realistic number sequence (not all zeros). Meets typical phone number length requirements (e.g., 8 to 15 digits). A suitable error message could be:
"Invalid phone number format. Please enter a valid phone number."
Actual Behavior The application accepts the input 00000000 without any validation or error message, resulting in a client entry with an invalid phone number.
Screenshot
Suggested Improvement Implement phone number validation that checks for realistic formats, such as:
Rejecting phone numbers with all identical digits (e.g., 00000000, 11111111). Enforcing a minimum length (e.g., 8 digits). Ensuring the phone number is composed of valid numeric characters without unusual patterns. This would improve data quality by ensuring only valid contact information is stored.
Labels:
severity.Medium
type.FunctionalityBug
original: AlekKwek18/ped#3