https://github.com/cvigueras/password-input-field-validation-kata
password-input-field-validation-kata
https://github.com/cvigueras/password-input-field-validation-kata
csharp tdd tdd-kata
Last synced: 3 days ago
JSON representation
password-input-field-validation-kata
- Host: GitHub
- URL: https://github.com/cvigueras/password-input-field-validation-kata
- Owner: cvigueras
- License: mit
- Created: 2023-04-03T08:59:02.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-06-27T09:54:37.000Z (over 2 years ago)
- Last Synced: 2025-02-23T21:44:34.772Z (8 months ago)
- Topics: csharp, tdd, tdd-kata
- Language: C#
- Homepage:
- Size: 39.1 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# password-input-field-validation-kata
Create a function that can be used as a validator for the password field of a user registration form. The validation function takes a string as an input and returns a validation result. The validation result should contain a boolean indicating if the password is valid or not, and also a field with the possible validation errors.
#Requirements
* 1. The password must be at least 8 characters long. If it is not met, then the following error message should be returned: “Password must be at least 8 characters”
* 2. The password must contain at least 2 numbers. If it is not met, then the following error message should be returned: “The password must contain at least 2 numbers”
* 3. The validation function should handle multiple validation errors.
For example, “somepassword” should an error message: “Password must be at least 8 characters\nThe password must contain at least 2 numbers”
* 4. The password must contain at least one capital letter. If it is not met, then the following error message should be returned: “password must contain at least one capital letter”* 5. The password must contain at least one special character. If it is not met, then the following error message should be returned: “password must contain at least one special character”