How can I fix the confirm password field so it doesn't create an account if passwords don't match?

I have successfully created a field for confirm password, and I get a pop up if the passwords to not match. The only problem is that it will still create an account if the passwords do not match.

My current code is


    
            
    
    
 
      
      
    

    
            
    {%- if form.errors contains 'password' -%}
      
        
        {{ form.errors.translated_fields['password'] | capitalize }} {{ form.errors.messages['password'] }}.
      
    {%- endif -%}
    
  {%- endform -%}

Is there any simple fix I can add to change this

For the simplest no-code solution, check out the Customer Fields app. You can use the app’s Lite plan to create a password confirmation field on your registration form. Other features on the Lite plan include:

  • Require email verification
  • Allow customers to edit their own name, email, etc.
  • Email notifications for staff for new or edited customers

I have the same problem. Any solutions? Thanks