Closed nus-se-bot closed 4 days ago
As mentioned on the website, we can't modify this validation check, so we will either put it in the UG(In planned enhancements), or we just have to leave it as it is.
Closing: the bug that does not allow country codes to be added has been patched, and the issue of "realistic" phone numbers is too questionable to deal with.
In the Clientele+ application, editing a client’s phone number with an invalid format (e.g.,
00000000
) is accepted without any validation error. This behavior allows the application to store unrealistic or unusable phone numbers, which could lead to ineffective contact management and potentially hinder client communication.Steps to Reproduce Open the Clientele+ application. Ensure that there is an existing client (e.g., "Bernice Yu"). Enter the following edit command to update the phone number with an invalid format: `edit 1 p/00000000 e/berniceyu@example.com' Observe that the edit is accepted, and the phone number 00000000 is saved for the client.
Expected Behavior The application should validate the phone number field during edits and reject entries that do not follow a realistic phone number format. Ideally, an error message should appear, such as:
"Invalid phone number format. Please enter a valid phone number."
Actual Behavior The application accepts the invalid phone number (00000000) and updates the client’s details without any validation, resulting in a stored contact with an unusable phone number.
Screenshot
Suggested Improvement Introduce validation for the phone number format in both add and edit commands, ensuring that:
Numbers like 00000000 (or any series of repeated digits) are rejected. Minimum and maximum length constraints for phone numbers are enforced. Phone numbers consist of realistic numeric sequences without placeholder or default values. This will help maintain the integrity of the data and improve the utility of the contact information stored within the application.
Labels:
severity.Medium
type.FunctionalityBug
original: AlekKwek18/ped#4