Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bounoable/strongword
Simple utility library for password strength validation.
https://github.com/bounoable/strongword
go golang password strength validation
Last synced: about 5 hours ago
JSON representation
Simple utility library for password strength validation.
- Host: GitHub
- URL: https://github.com/bounoable/strongword
- Owner: bounoable
- License: mit
- Created: 2020-02-26T15:54:45.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-02-26T15:55:15.000Z (over 4 years ago)
- Last Synced: 2024-06-20T08:01:23.975Z (5 months ago)
- Topics: go, golang, password, strength, validation
- Language: Go
- Size: 3.91 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# strongword - Password strength validator for GO
Simple utility library to validate password strengths against a set of rules.
## Install
```sh
go get github.com/bounoable/strongword
```## Usage
### Default rule set
```go
import "github.com/bounoable/strongword"errs := strongword.Validate("weakpassword")
for _, err := range errs {
fmt.Println(err)
}
```### Custom rule set
```go
import "github.com/bounoable/strongword"errs := strongword.Validate(
"weakpassword",
strongword.MinLength(12),
strongword.SpecialChars(3),
strongword.Regexp(regexp.MustCompile("(?)[0-9]{4}"))
)for _, err := range errs {
fmt.Println(err)
}
```