diff --git a/password_policy.module b/password_policy.module
index 327b7bd..d433119 100644
--- a/password_policy.module
+++ b/password_policy.module
@@ -7,7 +7,7 @@ use Drupal\Core\Datetime\DrupalDateTime;
  * Implements hook_form_FORM_ID_alter() for user_form().
  */
 function password_policy_form_user_form_alter(&$form, &$form_state) {
-  
+
   //hide password reset field if no access
   $account = \Drupal::currentUser();
   if (!$account->hasPermission('manage password reset')) {
@@ -89,6 +89,11 @@ function _password_policy_user_profile_form_validate(&$form, &$form_state) {
  */
 function _password_policy_constraints_validate(&$form, &$form_state, $generate_policy_table = FALSE, &$policies_table_rows = array()) {
 
+  $expiration = $form_state->getValue('field_password_expiration');
+  if (!is_null($expiration) && $expiration['value'] === FALSE) {
+    $form_state->setValue('field_password_expiration', array('value' => 0));
+  }
+
   $roles = $form_state->getValue('roles');
   if (empty($roles)) {
     //get if from $form; form state is always empty the first time.
@@ -98,7 +103,7 @@ function _password_policy_constraints_validate(&$form, &$form_state, $generate_p
 
   $orignal_roles = $form['account']['roles']['#default_value'];
   $orignal_roles = array_combine($orignal_roles, $orignal_roles);
-  
+
   //add user doesn't automatically register authenticated, so lets add it
   if (empty($roles)) {
     $roles = array('authenticated' => 'authenticated');
@@ -188,7 +193,7 @@ function _password_policy_constraints_validate(&$form, &$form_state, $generate_p
           $failed = TRUE;
         }
         else if ($force_failure){
-          $failed = TRUE; 
+          $failed = TRUE;
         }
       }
     }
@@ -226,7 +231,7 @@ function _password_policy_user_profile_form_submit(&$form, $form_state){
  * {@inheritdoc}
  */
 function password_policy_user_presave(Drupal\Core\Entity\EntityInterface $entity) {
-  
+
   if (!$entity->id()) {
     $date = date('Y-m-d\TH:i:s');
     $entity->set('field_last_password_reset', $date);
@@ -248,7 +253,7 @@ function _password_policy_constraints_table($form, $form_state) {
 
   $policies_table_rows = array();
   _password_policy_constraints_validate($form, $form_state, TRUE, $policies_table_rows);
-  
+
   return $policies_table_rows;
 
 }
