wagslane / go-password-validator

Validate the Strength of a Password in Go
https://blog.boot.dev/open-source/how-to-validate-passwords/
MIT License
493 stars 39 forks source link

Add validate function to return error slice #17

Open midorimici opened 3 weeks ago

midorimici commented 3 weeks ago

Currently, the Validate function returns validation errors as a combined string. It makes the client difficult to show custom messages to users. In this PR, I added another function ValidateWithErrorSlice to return an error slice so the caller can handle errors properly.