[openstreetmap/openstreetmap-website] Require password on sign up form submit (PR #6832)

Stillhart notifications at github.com
Fri Feb 20 23:04:24 UTC 2026


### Description

Currently the `email` and the `display_name` have the basic html attribute `required="required"` which forces the users to enter something before submitting the form. It prevents them from submitting empty fields.

The `required="required"` is missing for both `password` and `password confirmation` fields, so I added it.

This change skips bootstrap and backend validations and uses the browsers builtin (limited) capabilities.
The user can still enter a too short password.

In case only rails validations after submit are desired, we might consider removing the `required="required"` attribute for the email and password.

Slightly related, html has `pattern` that can be used for client side validations, but the error messages are less helpful.

### How has this been tested?

I ran the existing testsuite and testing it myself in the browser.

### Related

Should there be more client side validations avoiding the blind submit and then fail? I may help with that.
You can view, comment on, or merge this pull request online at:

  https://github.com/openstreetmap/openstreetmap-website/pull/6832

-- Commit Summary --

  * require password on user sign up, same as email and username

-- File Changes --

    M app/views/users/new.html.erb (4)

-- Patch Links --

https://github.com/openstreetmap/openstreetmap-website/pull/6832.patch
https://github.com/openstreetmap/openstreetmap-website/pull/6832.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/6832
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/6832 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20260220/0d64c8ab/attachment.htm>


More information about the rails-dev mailing list