Attempt at converting the password_policy to drupal 8.