Use the LDAP password quality advice control to test passwords,
and to validate that a password policy produces the expected failures
when a new password does not comply with its requirements.
The feature is available over LDAP,
and also over REST for HTTP applications.