23/02
2018
Wallogit.com
2017 © Pedro Peláez
PwnedPassword Validator Constraint for Symfony
This Validator uses curl to query the https://haveibeenpwned.com API for the first 5 chars of the SHA1 of a value, that is to be validated. If it finds the exact SHA1 hash in the response it will add a validation error., (*1)
use R\Validator\Constraints as RAssert;
class MyEntity {
/**
* @RAssert\PwnedPasswords()
**/
var $password;
}